Add notifications when removed from owners or pending_owners
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user