|
@@ -60,9 +60,12 @@ abstract class base_room
|
|
|
$ret = ['room' => $this->mRoomid,'invitees' => $users,'newusers' => $newusers];
|
|
|
if(!empty($newusers)) {
|
|
|
$content = $this->format_invite($inviter,$newusers);
|
|
|
- $type = proto_type::to_msgtype(proto_type::msg_stype_plain);
|
|
|
- $msgid = $this->record_message(0,$type,$content);
|
|
|
- $this->relay_broadcast('message',['msgid' => $msgid,'type' => proto_type::msg_stype_plain,'content' => $content,'send_time' => time()]);
|
|
|
+ if($content !== false)
|
|
|
+ {
|
|
|
+ $type = proto_type::to_msgtype(proto_type::msg_stype_plain);
|
|
|
+ $msgid = $this->record_message(0,$type,$content);
|
|
|
+ $this->relay_broadcast('message',['msgid' => $msgid,'type' => proto_type::msg_stype_plain,'content' => $content,'send_time' => time()]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return $ret;
|
|
@@ -130,6 +133,10 @@ abstract class base_room
|
|
|
$invitees = $this->userinfos($invitees);
|
|
|
$inviter = $this->userinfos($inviter);
|
|
|
|
|
|
+ if( count($invitees)==1 && $invitees[0]['userid']==$inviter['userid']){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
$str = "<font color='#3c78d8'>{$inviter['nickname']}</font>邀请";
|
|
|
$contents = [];
|
|
|
foreach ($invitees as $user) {
|