军团:邀请不可以请不同服的人
This commit is contained in:
@@ -422,7 +422,7 @@ export class GuildHandler {
|
||||
let result = new Array<string>();
|
||||
let uids = [];
|
||||
for (let role of roleList) {
|
||||
if (!role.hasGuild) {
|
||||
if (!role.hasGuild || role.serverId == serverId) {
|
||||
await UserGuildApplyModel.createUserGuildApply(role, guild, GUILD_APPLY_TYPE.INVITE);
|
||||
result.push(role.roleId);
|
||||
let hisInfo = await getRoleOnlineInfo(role.roleId);
|
||||
@@ -431,6 +431,10 @@ export class GuildHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(result.length <= 0) {
|
||||
return resResult(STATUS.GUILD_CANNOT_INVITE)
|
||||
}
|
||||
|
||||
await GuildModel.recordInvitedMember(code, serverId, roleIds, shouldRefresh(guild.inviteTime, new Date()));
|
||||
this.channelService.pushMessageByUids('onGuildInvite', resResult(STATUS.SUCCESS, { code }), uids);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user