diff options
author | Joas Schilling <coding@schilljs.com> | 2023-05-09 07:32:54 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-05-09 07:32:54 +0200 |
commit | 95facb31432757a4ae35ac78e61030d48b7133d1 (patch) | |
tree | 17659cb79d4bb611e91bf50501f153efdf1ddf34 /lib | |
parent | b88ca2213ffac44d0e58f07eb877cfce439c9e85 (diff) |
fix(chat): Fix call summary with only numeric user ids
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Chat/Parser/SystemMessage.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index 77fb45f97..335ecf4c8 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -900,9 +900,10 @@ class SystemMessage { protected function parseCall(string $message, array $parameters, array $params): array { if ($message === 'call_ended_everyone') { if ($params['actor']['type'] === 'user') { - $flipped = array_flip($parameters['users']); - unset($flipped[$params['actor']['id']]); - $parameters['users'] = array_flip($flipped); + $entry = array_keys($parameters['users'], $params['actor']['id'], true); + foreach ($entry as $i) { + unset($parameters['users'][$i]); + } } else { $parameters['guests']--; } |