mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
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:
parent
9e163b7647
commit
811984878c
1 changed files with 2 additions and 2 deletions
4
state.js
4
state.js
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue