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:
Brion Vibber
2010-04-20 12:06:54 +02:00
parent 0e1be7e01b
commit c48caa85e1
5 changed files with 81 additions and 19 deletions

View File

@@ -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);
}