remote control: /NOTIFY: if multiple arguments are provided, interpret the first one as the icon's name for the client notification

This commit is contained in:
bordun 2022-08-29 15:40:46 +02:00
parent 7789e5322d
commit 2ab69d29fb
4 changed files with 19 additions and 3 deletions

View file

@ -247,8 +247,14 @@ var callbacks = {
if (!Array.isArray(args)) args = [args]
var icon
if (args.length > 1 && typeof args[0] === 'string' && args[0].indexOf(' ') === -1) {
icon = args.shift()
}
notifications.add({
message: args.join('\n') || ' '
message: args.join('\n') || ' ',
icon: icon
})
},