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
This commit is contained in:
Simon Ser 2021-05-25 12:46:00 +02:00
parent 9e163b7647
commit 811984878c

View file

@ -49,8 +49,8 @@ export function getBufferURL(buf) {
export function getMessageURL(buf, msg) { export function getMessageURL(buf, msg) {
var bufURL = getBufferURL(buf); var bufURL = getBufferURL(buf);
if (msg.tags.msgid) { if (msg.tags.msgid) {
return bufURL + "#msgid=" + encodeURIComponent(msg.tags.msgid); return bufURL + "?msgid=" + encodeURIComponent(msg.tags.msgid);
} else { } else {
return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time); return bufURL + "?timestamp=" + encodeURIComponent(msg.tags.time);
} }
} }