fix(notif): set URL for Discord embeds rather than adding a field for the link (#1167)

pull/1161/head
TheCatLady 4 years ago committed by GitHub
parent 3148d31214
commit 0bd0912613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -156,15 +156,14 @@ class DiscordAgent
break;
}
if (settings.main.applicationUrl && payload.media) {
fields.push({
name: `Open in ${settings.main.applicationTitle}`,
value: `${settings.main.applicationUrl}/${payload.media?.mediaType}/${payload.media?.tmdbId}`,
});
}
const url =
settings.main.applicationUrl && payload.media
? `${settings.main.applicationUrl}/${payload.media.mediaType}/${payload.media.tmdbId}`
: undefined;
return {
title: payload.subject,
url,
description: payload.message,
color,
timestamp: new Date().toISOString(),

Loading…
Cancel
Save