notificationDaemon: Remove rewriteRules
It's not really Shell's business to fix bad app notification contents. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1962>
This commit is contained in:
parent
6c4089025f
commit
c6bcc74649
@ -25,17 +25,6 @@ var Urgency = {
|
||||
CRITICAL: 2,
|
||||
};
|
||||
|
||||
const rewriteRules = {
|
||||
'XChat': [
|
||||
{ pattern: /^XChat: Private message from: (\S*) \(.*\)$/,
|
||||
replacement: '<$1>' },
|
||||
{ pattern: /^XChat: New public message from: (\S*) \((.*)\)$/,
|
||||
replacement: '$2 <$1>' },
|
||||
{ pattern: /^XChat: Highlighted message from: (\S*) \((.*)\)$/,
|
||||
replacement: '$2 <$1>' },
|
||||
],
|
||||
};
|
||||
|
||||
var FdoNotificationDaemon = class FdoNotificationDaemon {
|
||||
constructor() {
|
||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(FdoNotificationsIface, this);
|
||||
@ -166,15 +155,6 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
|
||||
return invocation.return_value(GLib.Variant.new('(u)', [id]));
|
||||
}
|
||||
|
||||
let rewrites = rewriteRules[appName];
|
||||
if (rewrites) {
|
||||
for (let i = 0; i < rewrites.length; i++) {
|
||||
let rule = rewrites[i];
|
||||
if (summary.search(rule.pattern) != -1)
|
||||
summary = summary.replace(rule.pattern, rule.replacement);
|
||||
}
|
||||
}
|
||||
|
||||
// Be compatible with the various hints for image data and image path
|
||||
// 'image-data' and 'image-path' are the latest name of these hints, introduced in 1.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user