Skip to content

Commit e92295e

Browse files
authored
Merge pull request #18 from beclab/feat/application-add-icon
feat(notification): update app notification icon
2 parents 177ca03 + 806f982 commit e92295e

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/notification/UsersService.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export class UsersService implements OnModuleDestroy, OnModuleInit {
270270
// const appName = data.name || '';
271271
const title = data.title || data.name || '';
272272
const opId = data.opID;
273+
const icon = data.icon || '';
273274
if (opType == 'install' && state == 'running') {
274275
await this.natsClientPublish(
275276
user,
@@ -279,7 +280,8 @@ export class UsersService implements OnModuleDestroy, OnModuleInit {
279280
appName: title,
280281
vars: {
281282
appName: title
282-
}
283+
},
284+
icon: icon
283285
}
284286
);
285287
} else if (!!opId && state == 'stopped') {
@@ -300,10 +302,11 @@ export class UsersService implements OnModuleDestroy, OnModuleInit {
300302
'market',
301303
templateId,
302304
{
303-
title: title,
305+
appName: title,
304306
vars: {
305307
title
306-
}
308+
},
309+
icon: icon
307310
}
308311
);
309312
} else if (
@@ -318,7 +321,8 @@ export class UsersService implements OnModuleDestroy, OnModuleInit {
318321
appName: title,
319322
vars: {
320323
appName: title
321-
}
324+
},
325+
icon: icon
322326
}
323327
);
324328
} else if (
@@ -333,7 +337,8 @@ export class UsersService implements OnModuleDestroy, OnModuleInit {
333337
appName: title,
334338
vars: {
335339
appName: title
336-
}
340+
},
341+
icon: icon
337342
}
338343
);
339344
}

0 commit comments

Comments
 (0)