Strip ANSI sequences from notifications text

This commit is contained in:
Simon Ser 2020-08-13 15:38:12 +02:00
parent 8fa91f7c4a
commit 028382aab3
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -8,6 +8,7 @@ import Connect from "/components/connect.js";
import Composer from "/components/composer.js";
import ScrollManager from "/components/scroll-manager.js";
import { html, Component, createRef } from "/lib/index.js";
import { strip as stripANSI } from "/lib/ansi.js";
import { SERVER_BUFFER, BufferType, ReceiptType, Status, Unread } from "/state.js";
import commands from "/commands.js";
import { setup as setupKeybindings } from "/keybindings.js";
@ -309,7 +310,7 @@ export default class App extends Component {
title += " in " + target;
}
var notif = new Notification(title, {
body: text,
body: stripANSI(text),
requireInteraction: true,
});
notif.addEventListener("click", () => {