mirror of
https://codeberg.org/emersion/gamja
synced 2025-04-22 01:23:56 +02:00
Add notification tags
This makes it so multiple messages from the same user will only produce a single notification.
This commit is contained in:
parent
63773f99ee
commit
6039e13411
@ -368,6 +368,7 @@ export default class App extends Component {
|
|||||||
var notif = showNotification(title, {
|
var notif = showNotification(title, {
|
||||||
body: stripANSI(text),
|
body: stripANSI(text),
|
||||||
requireInteraction: true,
|
requireInteraction: true,
|
||||||
|
tag: "msg," + msg.prefix.name + "," + bufName,
|
||||||
});
|
});
|
||||||
notif.addEventListener("click", () => {
|
notif.addEventListener("click", () => {
|
||||||
// TODO: scroll to message
|
// TODO: scroll to message
|
||||||
@ -382,6 +383,7 @@ export default class App extends Component {
|
|||||||
var notif = new Notification("Invitation to " + channel, {
|
var notif = new Notification("Invitation to " + channel, {
|
||||||
body: msg.prefix.name + " has invited you to " + channel,
|
body: msg.prefix.name + " has invited you to " + channel,
|
||||||
requireInteraction: true,
|
requireInteraction: true,
|
||||||
|
tag: "invite," + msg.prefix.name + "," + channel,
|
||||||
actions: [{
|
actions: [{
|
||||||
action: "accept",
|
action: "accept",
|
||||||
title: "Accept",
|
title: "Accept",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user