Notify the other user when we kick them from a team

This commit is contained in:
yflory
2019-09-23 10:51:46 +02:00
parent 977198122f
commit 1a9229e0ec
3 changed files with 55 additions and 6 deletions

View File

@@ -271,6 +271,22 @@ define([
}
};
handlers['KICKED_FROM_TEAM'] = function (common, data) {
var content = data.content;
var msg = content.msg;
// Display the notification
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
var teamName = Util.fixHTML(Util.find(msg, ['content', 'teamName']) || '');
content.getFormatText = function () {
var text = name + " has kicked you from join the team <b>" + teamName +"</b>";
return text;
};
if (!content.archived) {
content.dismissHandler = defaultDismiss(common, data);
}
};
handlers['INVITE_TO_TEAM_ANSWER'] = function (common, data) {
var content = data.content;
var msg = content.msg;