Skip to content

Commit

Permalink
fix(federation): Fix "You accepted the invitation" system message
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 28, 2024
1 parent 6678d24 commit 0021bbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Chat/Parser/SystemMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ protected function parseMessage(Message $chatMessage): void {
$parsedMessage = $this->l->t('{actor} invited {federated_user}');
if ($currentUserIsActor) {
$parsedMessage = $this->l->t('You invited {federated_user}');
if ($parsedParameters['federated_user']['id'] === $parsedParameters['actor']['id']) {
$parsedMessage = $this->l->t('You accepted the invitation');
}
} elseif ($cliIsActor) {
$parsedMessage = $this->l->t('An administrator invited {federated_user}');
} elseif ($parsedParameters['federated_user']['id'] === $parsedParameters['actor']['id']) {
Expand Down

0 comments on commit 0021bbc

Please sign in to comment.