聊天:玩家在军团频道发消息的测试
This commit is contained in:
@@ -151,17 +151,17 @@ async function addRoleToChannel(roomId: string, roleId: string, sid: string) {
|
||||
}
|
||||
|
||||
export async function addRoleToSysChannel(roleId: string, sid: string, serverId: number) {
|
||||
const roomId = groupRoomId('sys', `${serverId}`);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.SYS, `${serverId}`);
|
||||
await addRoleToChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function addRoleToWorldChannel(roleId: string, sid: string, serverId: number) {
|
||||
const roomId = groupRoomId('new_world', `${serverId}`);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.WORLD, `${serverId}`);
|
||||
await addRoleToChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function addRoleToGuildChannel(roleId: string, sid: string, guildCode: string) {
|
||||
const roomId = groupRoomId('new_guild', guildCode);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GUILD, guildCode);
|
||||
await addRoleToChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
@@ -171,19 +171,19 @@ async function leaveChannel(roomId: string, roleId: string, sid: string) {
|
||||
}
|
||||
|
||||
export async function leaveSysChannel(roleId: string, sid: string, serverId: number) {
|
||||
const roomId = groupRoomId('sys', `${serverId}`);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.SYS, `${serverId}`);
|
||||
await leaveChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function leaveWorldChannel(roleId: string, sid: string, serverId: number) {
|
||||
const roomId = groupRoomId('new_world', `${serverId}`);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.WORLD, `${serverId}`);
|
||||
await leaveChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function leaveGuildChannel(roleId: string, sid: string) {
|
||||
const { guildCode } = await RoleModel.findByRoleId(roleId, 'guildCode');
|
||||
if (!guildCode) return;
|
||||
const roomId = groupRoomId('new_guild', guildCode);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GUILD, guildCode);
|
||||
await leaveChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user