Skip to content

Commit

Permalink
fixed: notification on waitinglist promotion respects recipient language
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Nov 14, 2024
1 parent 23106d6 commit aeffc46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,9 @@ public function generateNewAttendee(): bool {
}

$this->rsvp(EVENT_MANAGER_RELATION_ATTENDING, $waiting_user->guid, false, false, false);

$current_language = elgg_get_current_language();
elgg()->translator->setCurrentLanguage($waiting_user->getLanguage());

$notification_body = elgg_echo('event_manager:event:registration:notification:user:text:event_spotfree', [
$this->getDisplayName(),
Expand All @@ -1016,6 +1019,8 @@ public function generateNewAttendee(): bool {
}

notify_user($waiting_user->guid, $this->owner_guid, elgg_echo('event_manager:event:registration:notification:user:subject'), $notification_body);

elgg()->translator->setCurrentLanguage($current_language);

return true;
}
Expand Down

0 comments on commit aeffc46

Please sign in to comment.