Commit 35d4e96d authored by MBoretto's avatar MBoretto

participant retrocompatibility

parent da1f79da
......@@ -70,7 +70,7 @@ class WhoisCommand extends AdminCommand
true, //Select supergroups (super group chat)
true, //Select users (single chat)
null, //'yyyy-mm-dd hh:mm:ss' date range from
null, //'yyyy-mm-dd hh:mm:ss' date range to
null, //'yyyy-mm-dd hh:mm:ss' date range to
$user_id //Specific chat_id to select
);
......
......@@ -190,16 +190,13 @@ class Message extends Entity
$this->type = 'Venue';
}
$this->new_chat_member = isset($data['new_chat_participant']) ? $data['new_chat_participant'] : null;
if (!empty($this->new_chat_member)) {
$this->new_chat_member = new User($this->new_chat_member);
$this->type = 'new_chat_member';
//retrocompatibility
if (isset($data['new_chat_participant'])) {
$data['new_chat_member'] = $data['new_chat_participant'];
}
$this->left_chat_member = isset($data['left_chat_participant']) ? $data['left_chat_participant'] : null;
if (!empty($this->left_chat_member)) {
$this->left_chat_member = new User($this->left_chat_member);
$this->type = 'left_chat_member';
if (isset($data['left_chat_participant'])) {
$data['left_chat_member'] = $data['left_chat_participant'];
}
$this->new_chat_member = isset($data['new_chat_member']) ? $data['new_chat_member'] : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment