diff --git a/server/imserver_new/guild/guildmgr.go b/server/imserver_new/guild/guildmgr.go index 98e514b6..f51b5aba 100644 --- a/server/imserver_new/guild/guildmgr.go +++ b/server/imserver_new/guild/guildmgr.go @@ -399,6 +399,11 @@ func (this *guildMgr) asyncAcceptApplyTask(task *f5.AsyncTask, guild *guild, cb(1, "") return } + if accountId == targetId { + task.SetFail() + cb(1, "") + return + } if this.internalGetMemberByAccountId(targetId) != nil { task.SetFail() cb(1, "") @@ -440,7 +445,7 @@ func (this *guildMgr) asyncAcceptApplyTask(task *f5.AsyncTask, guild *guild, func (this *guildMgr) AsyncAcceptApply(accountId string, targetId string, cb func(int32, string)) { guild := this.internalGetGuildByAccountId(accountId) if guild == nil { - cb(1, "") + cb(0, "") return; } f5.NewLockAsyncTask([][]string{