Add notifications when removed from owners or pending_owners

This commit is contained in:
yflory
2019-09-02 18:46:52 +02:00
parent d190b8acd0
commit 4708d59a65
4 changed files with 82 additions and 16 deletions

View File

@@ -252,6 +252,24 @@ define([
}
};
handlers['RM_OWNER'] = 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 title = Util.fixHTML(msg.content.title);
Messages.owner_removed = '{0} has removed your ownership of <b>{1}</b>'; // XXX
Messages.owner_removedPending = '{0} has removed your pending ownership of <b>{1}</b>'; // XXX
var key = 'owner_removed' + (msg.content.pending ? 'Pending' : '');
content.getFormatText = function () {
return Messages._getKey(key, [name, title]);
};
if (!content.archived) {
content.dismissHandler = defaultDismiss(common, data);
}
};
// NOTE: don't forget to fixHTML everything returned by "getFormatText"
return {