Skip to content

Commit

Permalink
Fix system notification link
Browse files Browse the repository at this point in the history
  • Loading branch information
twobiers authored Apr 1, 2024
1 parent f0d6f4e commit 01ab421
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/module/NotificationCenter/NotificationCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,20 @@ export default class NotificationCenter implements PoweruserModule {
msg: any,
read: boolean
) {
let elem = document.createElement("li");
const elem = document.createElement("li");
elem.id = `notification-${cId}`;
let img =
'<img src="//thumb.pr0gramm.com/##THUMB##" class="comment-thumb">';
let url = image ? `/new/${id}:comment${cId}` : `/inbox/messages/${user}`;
const isSystemNotification = user === null;
const url = image ? `/new/${id}:comment${cId}` : isSystemNotification ? `/inbox/notifications` : `/inbox/messages/${user}`;

if (!image) {
img = '<span class="message fa fa-envelope-open"></span>';
} else {
img = img.replace("##THUMB", image);
}

if (user === null) {
if (isSystemNotification) {
user = "Systembenachrichtigung";
}

Expand Down

0 comments on commit 01ab421

Please sign in to comment.