Commit a957665c authored by Jack'lul's avatar Jack'lul

Use array and implode for this instead

parent 82873c03
......@@ -804,19 +804,15 @@ class DB
//New and left chat member
if (!empty($new_chat_members)) {
$new_chat_members_ids = '';
$new_chat_members_ids = [];
foreach ($new_chat_members as $new_chat_member) {
if ($new_chat_member instanceof User) {
//Insert the new chat user
self::insertUser($new_chat_member, $date, $chat);
if (!empty($new_chat_members_ids)) {
$new_chat_members_ids .= ',';
}
$new_chat_members_ids .= $new_chat_member->getId();
$new_chat_members_ids[] = $new_chat_member->getId();
}
}
$new_chat_members_ids = implode(',', $new_chat_members_ids);
} elseif ($left_chat_member instanceof User) {
//Insert the left chat user
self::insertUser($left_chat_member, $date, $chat);
......
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