1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-19 11:03:17 +02:00

WIP: DIsplay name for the web app

This commit is contained in:
Philipp Heckel 2022-06-29 15:57:56 -04:00
parent 2d26a990a9
commit 4d6c147f24
9 changed files with 108 additions and 15 deletions
web/src/app

View file

@ -1,4 +1,4 @@
import {formatMessage, formatTitleWithDefault, openUrl, playSound, topicShortUrl} from "./utils";
import {formatMessage, formatTitleWithDefault, openUrl, playSound, topicDisplayName, topicShortUrl} from "./utils";
import prefs from "./Prefs";
import subscriptionManager from "./SubscriptionManager";
import logo from "../img/ntfy.png";
@ -18,8 +18,9 @@ class Notifier {
return;
}
const shortUrl = topicShortUrl(subscription.baseUrl, subscription.topic);
const displayName = topicDisplayName(subscription);
const message = formatMessage(notification);
const title = formatTitleWithDefault(notification, shortUrl);
const title = formatTitleWithDefault(notification, displayName);
// Show notification
console.log(`[Notifier, ${shortUrl}] Displaying notification ${notification.id}: ${message}`);