forked from GNUsocial/gnu-social
Fix email notifications for @-replies that come via OStatus.
* Moved notification sending from Notice::saveReplies to distrib queue handler, so it'll pull from the reply set we've saved regardless of how we got it. * Set up gettext infrastructure for command-line scripts; gets localization mail notifications etc working from background queues. * Adjusted locale switching: common_switch_locale() works at runtime for bg scripts, forces a message catalog update
This commit is contained in:
@@ -620,7 +620,7 @@ function mail_notify_attn($user, $notice)
|
||||
|
||||
$bestname = $sender->getBestName();
|
||||
|
||||
common_init_locale($user->language);
|
||||
common_switch_locale($user->language);
|
||||
|
||||
if ($notice->conversation != $notice->id) {
|
||||
$conversationEmailText = "The full conversation can be read here:\n\n".
|
||||
@@ -662,7 +662,7 @@ function mail_notify_attn($user, $notice)
|
||||
|
||||
$headers = _mail_prepare_headers('mention', $user->nickname, $sender->nickname);
|
||||
|
||||
common_init_locale();
|
||||
common_switch_locale();
|
||||
mail_to_user($user, $subject, $body, $headers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user