This commit is contained in:
aozhiwei 2023-09-15 12:07:10 +08:00
parent 571ee553e9
commit ed9be693fc

View File

@ -178,6 +178,7 @@ func (this *room) CMLeaveRoom(hdr *f5.MsgHdr, msg *cs.CMLeaveRoom) {
nextOwner := this.getNextOwner()
if nextOwner == nil {
this.doDisband(1)
return
} else {
this.removeMember(this.owner.hum.GetAccountId())
this.owner = nextOwner
@ -238,6 +239,7 @@ func (this *room) CMKickoutMember(hdr *f5.MsgHdr, msg *cs.CMKickoutMember) {
target := this.getMember(msg.GetTargetId())
if m == this.owner && target != nil {
notifyMsg := &cs.SMRoomKickoutNotify{}
notifyMsg.AccountIds = append(notifyMsg.AccountIds, msg.GetTargetId())
this.broadcastMsg(notifyMsg)
this.removeMember(target.hum.GetAccountId())
}