status_emoji: Show status emoji in message_body.

Previously the emoji_status set by the user would only be seen a few
places, it was decided that it would be useful to show the
emoji_status in a few additional other places as well.

Use the status_emoji template to show the status emoji in the
message_body and also implement live update behavior.

With refactor and minor edits by Yash RE.

Co-authored-by: YashRE42 <33805964+YashRE42@users.noreply.github.com>
This commit is contained in:
AnushaNathRoy
2022-02-05 23:43:05 +05:30
committed by Tim Abbott
parent e1fd47a692
commit 8da5edb7af
6 changed files with 21 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import * as people from "./people";
import * as pm_conversations from "./pm_conversations";
import * as recent_senders from "./recent_senders";
import * as stream_topic_history from "./stream_topic_history";
import * as user_status from "./user_status";
import * as util from "./util";
export function process_new_message(message) {
@@ -31,6 +32,7 @@ export function process_new_message(message) {
if (sender) {
message.sender_full_name = sender.full_name;
message.sender_email = sender.email;
message.status_emoji_info = user_status.get_status_emoji(message.sender_id);
}
// Convert topic even for PMs, as legacy code