|
@@ -19,7 +19,7 @@ class Easemob {
|
|
|
$clientIdOrAppID = $easemob_config['client_id'];
|
|
|
$clientSecretOrAppCertificate = $easemob_config['client_secret'];
|
|
|
|
|
|
- $this->auth = new Auth($appKey,$clientIdOrAppID,$clientSecretOrAppCertificate,2592000,false);
|
|
|
+ $this->auth = new Auth($appKey,$clientIdOrAppID,$clientSecretOrAppCertificate);
|
|
|
$this->room = new Room($this->auth);
|
|
|
$this->user = new User($this->auth);
|
|
|
}
|
|
@@ -115,7 +115,7 @@ class Easemob {
|
|
|
*/
|
|
|
public function room_createRoom($name,$info,$user_id){
|
|
|
$user_id = '' . $user_id . '';
|
|
|
- $room_id = $this->room->createRoom($name,$info,$user_id,[$user_id]);
|
|
|
+ $room_id = $this->room->createRoom($name,$info,$user_id,[$user_id],10000);
|
|
|
return $room_id;
|
|
|
}
|
|
|
|
|
@@ -188,6 +188,10 @@ class Easemob {
|
|
|
*/
|
|
|
public function room_setRoomCustomAttributeForced($room_id,$owner_id,$matedata){
|
|
|
$owner_id = ''.$owner_id.'';
|
|
|
+ //先进入房间
|
|
|
+ $rs = $this->room->addRoomMember($room_id,$owner_id);
|
|
|
+ //dump($rs);
|
|
|
+ //再设置
|
|
|
$rs = $this->room->setRoomCustomAttributeForced($room_id,$owner_id,$matedata);
|
|
|
return $rs;
|
|
|
}
|