mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
user status: Add frontend data layer for "status_text".
This sets up the frontend to handle "status_text" data like "out to lunch" or "in a meeting".
This commit is contained in:
@@ -458,10 +458,19 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
|
||||
break;
|
||||
|
||||
case 'user_status':
|
||||
if (event.away) {
|
||||
activity.on_set_away(event.user_id);
|
||||
} else {
|
||||
activity.on_revoke_away(event.user_id);
|
||||
if (event.away !== undefined) {
|
||||
if (event.away) {
|
||||
activity.on_set_away(event.user_id);
|
||||
} else {
|
||||
activity.on_revoke_away(event.user_id);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.info !== undefined) {
|
||||
user_status.set_status_text({
|
||||
user_id: event.user_id,
|
||||
status_text: event.info,
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user