sendCloseMessage대신 LeaveRoomMessage
This commit is contained in:
@ -415,7 +415,6 @@ type groupInMemory struct {
|
|||||||
sendUpstreamMessage func(*wshandler.UpstreamMessage)
|
sendUpstreamMessage func(*wshandler.UpstreamMessage)
|
||||||
sendEnterRoomMessage func(groupID, accountID)
|
sendEnterRoomMessage func(groupID, accountID)
|
||||||
sendLeaveRoomMessage func(groupID, accountID)
|
sendLeaveRoomMessage func(groupID, accountID)
|
||||||
sendCloseMessage func(accountID, string)
|
|
||||||
groups groupContainer
|
groups groupContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -745,7 +744,7 @@ func (gm *groupInMemory) PauseMember(gid primitive.ObjectID, mid primitive.Objec
|
|||||||
// 접속은 끊기지만 그룹에서 제거하지는 않는 상태
|
// 접속은 끊기지만 그룹에서 제거하지는 않는 상태
|
||||||
rconn.unregistOnCloseFunc("member_remove")
|
rconn.unregistOnCloseFunc("member_remove")
|
||||||
rconn.unregistOnCloseFunc("member_remove_invite")
|
rconn.unregistOnCloseFunc("member_remove_invite")
|
||||||
gm.sendCloseMessage(mid, "pause")
|
gm.sendLeaveRoomMessage(gid, mid)
|
||||||
|
|
||||||
gd := gm.groups.find(gid)
|
gd := gm.groups.find(gid)
|
||||||
if gd == nil {
|
if gd == nil {
|
||||||
@ -971,9 +970,6 @@ func (cfg *groupConfig) prepareInMemory(ctx context.Context, typename string, su
|
|||||||
sendLeaveRoomMessage: func(gid groupID, accid accountID) {
|
sendLeaveRoomMessage: func(gid groupID, accid accountID) {
|
||||||
wsh.LeaveRoom(region, gid.Hex(), accid)
|
wsh.LeaveRoom(region, gid.Hex(), accid)
|
||||||
},
|
},
|
||||||
sendCloseMessage: func(target accountID, text string) {
|
|
||||||
wsh.SendCloseMessage(region, target.Hex(), text)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc.RegistReceiver(gm)
|
rpc.RegistReceiver(gm)
|
||||||
|
|||||||
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.20
|
|||||||
require (
|
require (
|
||||||
github.com/go-redis/redis/v8 v8.11.5
|
github.com/go-redis/redis/v8 v8.11.5
|
||||||
go.mongodb.org/mongo-driver v1.11.7
|
go.mongodb.org/mongo-driver v1.11.7
|
||||||
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713064012-522bd4a597bc
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713080645-269fa0f8700e
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|||||||
2
go.sum
2
go.sum
@ -120,3 +120,5 @@ repositories.action2quare.com/ayo/gocommon v0.0.0-20230711084112-d48d4c0f2189 h1
|
|||||||
repositories.action2quare.com/ayo/gocommon v0.0.0-20230711084112-d48d4c0f2189/go.mod h1:ng62uGMGXyQSeuxePG5gJAMtip4Rnspu5Tu7hgvaXns=
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230711084112-d48d4c0f2189/go.mod h1:ng62uGMGXyQSeuxePG5gJAMtip4Rnspu5Tu7hgvaXns=
|
||||||
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713064012-522bd4a597bc h1:ToHccG1AAGFoAVldbJxCv+yBh/GvNyCd74sBp1Hf7YY=
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713064012-522bd4a597bc h1:ToHccG1AAGFoAVldbJxCv+yBh/GvNyCd74sBp1Hf7YY=
|
||||||
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713064012-522bd4a597bc/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713064012-522bd4a597bc/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=
|
||||||
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713080645-269fa0f8700e h1:94hUQRdZYbsYaTqm/cTI0pEBdp8zdfOSEfkxdO9kS9o=
|
||||||
|
repositories.action2quare.com/ayo/gocommon v0.0.0-20230713080645-269fa0f8700e/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=
|
||||||
|
|||||||
Reference in New Issue
Block a user