From 811984878cbfe9b3faa5a0b747784e4bf3161ee4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 25 May 2021 12:46:00 +0200 Subject: [PATCH] Switch to query params for msgid/timestamp in irc:// URLs The hash is confusing because channels often start with a # too. Instead, use a query parameter. This is consistent with [1], which uses query params for the channel key. [1]: https://datatracker.ietf.org/doc/html/draft-butcher-irc-url-04 --- state.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state.js b/state.js index 09d1c7f..f6e0d27 100644 --- a/state.js +++ b/state.js @@ -49,8 +49,8 @@ export function getBufferURL(buf) { export function getMessageURL(buf, msg) { var bufURL = getBufferURL(buf); if (msg.tags.msgid) { - return bufURL + "#msgid=" + encodeURIComponent(msg.tags.msgid); + return bufURL + "?msgid=" + encodeURIComponent(msg.tags.msgid); } else { - return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time); + return bufURL + "?timestamp=" + encodeURIComponent(msg.tags.time); } }