MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / apply

Method apply

src/actions/Notify.ts:108–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 2

replaceVariablesMethod · 0.80
keysMethod · 0.65

Tested by

no test coverage detected