From e041129a107b6763f328470b823c5f4e9eeb3ad2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 21 Jul 2020 14:48:04 +0200 Subject: [PATCH] Use msgid in message URL if available --- state.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/state.js b/state.js index 5a60b4d..bd98d77 100644 --- a/state.js +++ b/state.js @@ -45,5 +45,9 @@ export function getBufferURL(buf) { export function getMessageURL(buf, msg) { var bufURL = getBufferURL(buf); - return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time); + if (msg.tags.msgid) { + return bufURL + "#msgid=" + encodeURIComponent(msg.tags.msgid); + } else { + return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time); + } }