军团:fix 团长是否在线
This commit is contained in:
@@ -260,8 +260,8 @@ export class GuildHandler {
|
||||
return resResult(STATUS.GUILD_NOT_FOUND);
|
||||
}
|
||||
|
||||
guild.leader = <RoleType>guild.leader;
|
||||
let leaderIsOnline = await isRoleOnline(guild.leader.roleId);
|
||||
let leader = <RoleType>guild.leader;
|
||||
let leaderIsOnline = await isRoleOnline(leader.roleId);
|
||||
|
||||
// 打开公会页面,加入channel
|
||||
if(userGuild.guildCode) {
|
||||
@@ -272,7 +272,7 @@ export class GuildHandler {
|
||||
const rank = await getMyRank(REDIS_KEY.GUILD_ACTIVE_RANK, serverId, guild.code);
|
||||
|
||||
// 返回
|
||||
const result = { hasGuild: true, ...guild, rank, myInfo: {...userGuild, isOnline: leaderIsOnline}};
|
||||
const result = { hasGuild: true, ...guild, leader: { ...leader, isOnline: leaderIsOnline }, rank, myInfo: {...userGuild }};
|
||||
return resResult(STATUS.SUCCESS, result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user