sendCloseMessage대신 LeaveRoomMessage

This commit is contained in:
2023-07-13 17:09:47 +09:00
parent 8f2860165b
commit 9df68a4d07
3 changed files with 4 additions and 6 deletions

View File

@ -415,7 +415,6 @@ type groupInMemory struct {
sendUpstreamMessage func(*wshandler.UpstreamMessage)
sendEnterRoomMessage func(groupID, accountID)
sendLeaveRoomMessage func(groupID, accountID)
sendCloseMessage func(accountID, string)
groups groupContainer
}
@ -745,7 +744,7 @@ func (gm *groupInMemory) PauseMember(gid primitive.ObjectID, mid primitive.Objec
// 접속은 끊기지만 그룹에서 제거하지는 않는 상태
rconn.unregistOnCloseFunc("member_remove")
rconn.unregistOnCloseFunc("member_remove_invite")
gm.sendCloseMessage(mid, "pause")
gm.sendLeaveRoomMessage(gid, mid)
gd := gm.groups.find(gid)
if gd == nil {
@ -971,9 +970,6 @@ func (cfg *groupConfig) prepareInMemory(ctx context.Context, typename string, su
sendLeaveRoomMessage: func(gid groupID, accid accountID) {
wsh.LeaveRoom(region, gid.Hex(), accid)
},
sendCloseMessage: func(target accountID, text string) {
wsh.SendCloseMessage(region, target.Hex(), text)
},
}
rpc.RegistReceiver(gm)