军团:fix 团长是否在线

This commit is contained in:
luying
2021-02-22 14:33:24 +08:00
parent 9b1fa777cd
commit 0f7b528d67
2 changed files with 3 additions and 4 deletions

View File

@@ -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);
}