()
| 106 | } |
| 107 | |
| 108 | override async apply(): Promise<void> { |
| 109 | if (!this.notification) { |
| 110 | return; |
| 111 | } |
| 112 | |
| 113 | for (const key of Object.keys(this.notification)) { |
| 114 | if (typeof this.notification[key] === 'string') { |
| 115 | this.notification[key] = this.engine.replaceVariables(this.notification[key]); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | if (this.hasPermission) { |
| 120 | const notification = new Notification(this.notification.title, this.notification); |
| 121 | |
| 122 | if (typeof this.time !== 'undefined') { |
| 123 | setTimeout(() => { |
| 124 | notification.close(); |
| 125 | }, this.time); |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | override async didApply(): Promise<ActionApplyResult> { |
| 131 | Notify.blocking = false; |
nothing calls this directly
no test coverage detected