diff options
author | Joas Schilling <coding@schilljs.com> | 2024-02-29 20:24:32 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-02-29 20:24:32 +0100 |
commit | b9416607e3f7cdebffeb83fb8489cd9ed1b275ae (patch) | |
tree | 8fbd75f4ea456046f27dcaf73691f28e9d77d5ab /lib/Chat | |
parent | a91b44b0c4fac45ed6c419de717233a25c40a3e7 (diff) |
fix(CI): Fix psalm and phpunit - I shall never force merge
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Chat')
-rw-r--r-- | lib/Chat/Parser/SystemMessage.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index 3f57f0ebc..d7f48e611 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -825,12 +825,18 @@ class SystemMessage implements IEventListener { } protected function isCurrentParticipantChangedUser(?string $currentActorType, ?string $currentActorId, array $parameter): bool { - if (isset($parameter['server']) && $currentActorType === Attendee::ACTOR_FEDERATED_USERS) { + if ($currentActorType === Attendee::ACTOR_GUESTS) { + return $parameter['type'] === 'guest' && $currentActorId === $parameter['id']; + } + + if (isset($parameter['server']) + && $currentActorType === Attendee::ACTOR_FEDERATED_USERS + && $parameter['type'] === 'user') { return $this->currentFederatedUserDetails['user'] === $parameter['id'] && $this->currentFederatedUserDetails['server'] === $parameter['server']; } - return $currentActorType === Attendee::ACTOR_USERS && $currentActorId === $parameter['id']; + return $currentActorType === Attendee::ACTOR_USERS && $parameter['type'] === 'user' && $currentActorId === $parameter['id']; } protected function getActorFromComment(Room $room, IComment $comment): array { |