Fixed peer management of groups

This commit is contained in:
Daniil Gentili 2017-05-10 10:39:31 +02:00 committed by GitHub
parent 5af9aa93cf
commit fbf74ae0d3

View File

@ -52,9 +52,6 @@ trait PeerHandler
public function add_chats($chats)
{
foreach ($chats as $key => $chat) {
if (!isset($chat['access_hash'])) {
continue;
}
switch ($chat['_']) {
case 'chat':
case 'chatEmpty':
@ -75,6 +72,9 @@ trait PeerHandler
break;
case 'channel':
case 'channelForbidden':
if (!isset($chat['access_hash'])) {
continue;
}
if (!isset($this->chats[$this->to_supergroup($chat['id'])]) || $this->chats[$this->to_supergroup($chat['id'])] !== $chat) {
$this->chats[$this->to_supergroup($chat['id'])] = $chat;
$this->should_serialize = true;