This commit is contained in:
aozhiwei 2023-09-16 11:08:05 +08:00
parent 45ea4ae464
commit 5c5fb4c827
3 changed files with 15 additions and 1 deletions

View File

@ -20,6 +20,7 @@ enum CMMessageId_e
_CMKickoutMember = 114; _CMKickoutMember = 114;
_CMCloseNotify = 115; _CMCloseNotify = 115;
_CMReportPingValue = 116; _CMReportPingValue = 116;
_CMGetCurrentRoom = 117;
} }
enum SMMessageId_e enum SMMessageId_e
@ -39,6 +40,7 @@ enum SMMessageId_e
_SMSetPrepare = 112; _SMSetPrepare = 112;
_SMKickoutTeam = 113; _SMKickoutTeam = 113;
_SMKickoutMember = 114; _SMKickoutMember = 114;
_SMGetCurrentRoom = 117;
_SMRoomMemberChangeNotify = 1001; _SMRoomMemberChangeNotify = 1001;
_SMRoomKickoutNotify = 1002; _SMRoomKickoutNotify = 1002;

View File

@ -302,6 +302,16 @@ message CMReportPingValue
optional int32 ping = 1; optional int32 ping = 1;
} }
//
message CMGetCurrentRoom
{
}
message SMGetCurrentRoom
{
optional MFCurrentRoom room = 1; //
}
// //
message SMRoomMemberChangeNotify message SMRoomMemberChangeNotify
{ {

View File

@ -262,7 +262,9 @@ func (this *room) CMCloseNotify(hdr *f5.MsgHdr, msg *cs.CMCloseNotify) {
func (this *room) broadcastMsg(msg proto.Message) { func (this *room) broadcastMsg(msg proto.Message) {
for _, m := range(this.members) { for _, m := range(this.members) {
m.hum.SendMsg(msg) if m.hum.GetRoom() == this {
m.hum.SendMsg(msg)
}
} }
} }