2017-01-05 17:34:27 +01:00
|
|
|
var message_live_update = (function () {
|
|
|
|
|
|
|
|
var exports = {};
|
|
|
|
|
|
|
|
exports.update_stream_name = function (stream_id, new_name) {
|
|
|
|
_.each([home_msg_list, current_msg_list, message_list.all], function (list) {
|
|
|
|
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) {
|
|
|
|
_.each([home_msg_list, current_msg_list, message_list.all], function (list) {
|
|
|
|
list.update_user_full_name(user_id, full_name);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-01-21 21:45:52 +01:00
|
|
|
exports.update_avatar = function (person) {
|
|
|
|
var sent_by_me = people.is_my_user_id(person.user_id);
|
|
|
|
var url = person.avatar_url;
|
|
|
|
url = people.format_small_avatar_url(url, sent_by_me);
|
|
|
|
|
|
|
|
$(".inline_profile_picture.u-" + person.user_id).css({
|
|
|
|
"background-image": "url(" + url + ")",
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-01-05 17:34:27 +01:00
|
|
|
return exports;
|
|
|
|
|
|
|
|
}());
|
|
|
|
if (typeof module !== 'undefined') {
|
|
|
|
module.exports = message_live_update;
|
|
|
|
}
|
|
|
|
|