WIP: DIsplay name for the web app
This commit is contained in:
parent
2d26a990a9
commit
4d6c147f24
9 changed files with 108 additions and 15 deletions
|
@ -38,6 +38,15 @@ export const disallowedTopic = (topic) => {
|
|||
return config.disallowedTopics.includes(topic);
|
||||
}
|
||||
|
||||
export const topicDisplayName = (subscription) => {
|
||||
if (subscription.displayName) {
|
||||
return subscription.displayName;
|
||||
} else if (subscription.baseUrl === window.location.origin) {
|
||||
return subscription.topic;
|
||||
}
|
||||
return topicShortUrl(subscription.baseUrl, subscription.topic);
|
||||
};
|
||||
|
||||
// Format emojis (see emoji.js)
|
||||
const emojis = {};
|
||||
rawEmojis.forEach(emoji => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue