2017-01-05 17:34:27 +01:00
|
|
|
exports.update_stream_name = function (stream_id, new_name) {
|
2018-04-03 03:26:50 +02:00
|
|
|
_.each([home_msg_list, message_list.narrowed, message_list.all], function (list) {
|
|
|
|
if (list === undefined) {
|
|
|
|
return;
|
|
|
|
}
|
2017-01-05 17:34:27 +01:00
|
|
|
list.update_stream_name(stream_id, new_name);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-01-24 19:12:21 +01:00
|
|
|
exports.update_user_full_name = function (user_id, full_name) {
|
2018-04-03 03:26:50 +02:00
|
|
|
_.each([home_msg_list, message_list.narrowed, message_list.all], function (list) {
|
|
|
|
if (list === undefined) {
|
|
|
|
return;
|
|
|
|
}
|
2017-01-24 19:12:21 +01:00
|
|
|
list.update_user_full_name(user_id, full_name);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-02-23 00:31:34 +01:00
|
|
|
exports.update_avatar = function (user_id, avatar_url) {
|
2019-11-02 00:06:25 +01:00
|
|
|
let url = avatar_url;
|
2017-02-17 00:44:21 +01:00
|
|
|
url = people.format_small_avatar_url(url);
|
2017-01-21 21:45:52 +01:00
|
|
|
|
2018-04-03 03:26:50 +02:00
|
|
|
_.each([home_msg_list, message_list.narrowed, message_list.all], function (list) {
|
|
|
|
if (list === undefined) {
|
|
|
|
return;
|
|
|
|
}
|
2017-02-23 00:31:34 +01:00
|
|
|
list.update_user_avatar(user_id, url);
|
2017-01-21 21:45:52 +01:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2019-10-25 09:45:13 +02:00
|
|
|
window.message_live_update = exports;
|