mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 10:55:06 -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
6
state.js
6
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue