notify: forgot to join list, gets rid of commas

This commit is contained in:
Ralf Vogler 2023-01-25 19:35:18 +01:00
parent 0913ca3da7
commit 9355ff3e01
3 changed files with 3 additions and 3 deletions

View file

@ -199,7 +199,7 @@ try {
} finally { } finally {
await db.write(); // write out json db await db.write(); // write out json db
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed? if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})<br>`); const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})`).join('<br>');
notify(`epic-games:<br>${list}`); notify(`epic-games:<br>${list}`);
} }
} }

2
gog.js
View file

@ -127,7 +127,7 @@ try {
} finally { } finally {
await db.write(); // write out json db await db.write(); // write out json db
if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed? if (notify_games.filter(g => g.status != 'existed').length) { // don't notify if all were already claimed; TODO don't notify if killed?
const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})<br>`); const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})`).join('<br>');
notify(`gog:<br>${list}`); notify(`gog:<br>${list}`);
} }
} }

View file

@ -182,7 +182,7 @@ try {
} finally { } finally {
await db.write(); // write out json db await db.write(); // write out json db
if (notify_games.length) { // list should only include claimed games if (notify_games.length) { // list should only include claimed games
const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})<br>`); const list = notify_games.map(g => `- <a href="${g.url}">${g.title}</a> (${g.status})`).join('<br>');
notify(`prime-gaming:<br>${list}`); notify(`prime-gaming:<br>${list}`);
} }
} }