mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Use msgid in message URL if available
This commit is contained in:
parent
0d9f7f35f0
commit
e041129a10
1 changed files with 5 additions and 1 deletions
4
state.js
4
state.js
|
@ -45,5 +45,9 @@ 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) {
|
||||||
|
return bufURL + "#msgid=" + encodeURIComponent(msg.tags.msgid);
|
||||||
|
} else {
|
||||||
return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time);
|
return bufURL + "#timestamp=" + encodeURIComponent(msg.tags.time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue