优化:抽象推送方法
This commit is contained in:
@@ -65,19 +65,6 @@ export async function getTeraphStrengthenResult(role: RoleType, count: number, d
|
||||
return { times, consumes: check.getConsume(), criAttr }
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param channel
|
||||
* @param user
|
||||
*/
|
||||
export function addUserToChannel(channel: Channel, user: ChannelUser) {
|
||||
const users = channel.getMembers();
|
||||
const { uid, sid } = user;
|
||||
if (users.indexOf(uid) === -1) {
|
||||
channel.add(uid, sid);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getSimpleRoleInfo(roleId: string) {
|
||||
if (!roleId) return null;
|
||||
let role = await RoleModel.findByRoleId(roleId, ROLE_SELECT.SHOW_SIMPLE, true);
|
||||
|
||||
Reference in New Issue
Block a user