[overlays] Fix KoFi donation currency in eventfeed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-08-27 00:23:01 +02:00
parent b1ceb29bfb
commit 1d192ad796
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -345,11 +345,11 @@ const app = createApp({
handleKoFiDonation(eventId, data, time) { handleKoFiDonation(eventId, data, time) {
let text let text
if (data.isSubscription && data.isFirstSubPayment) { if (data.isSubscription && data.isFirstSubPayment) {
text = `${data.from} just started a monthly subscription of ${Number(data.amount).toFixed(2)}` text = `${data.from} just started a monthly subscription of ${Number(data.amount).toFixed(2)} ${data.currency}`
} else if (data.isSubscription && !data.isFirstSubPayment) { } else if (data.isSubscription && !data.isFirstSubPayment) {
text = `${data.from} continued their monthly subscription of ${Number(data.amount).toFixed(2)}` text = `${data.from} continued their monthly subscription of ${Number(data.amount).toFixed(2)} ${data.currency}`
} else { } else {
text = `${data.from} just donated ${Number(data.amount).toFixed(2)}` text = `${data.from} just donated ${Number(data.amount).toFixed(2)} ${data.currency}`
} }
this.addEvent({ this.addEvent({