keybindings: fix error on alt+h
Fixes the following JS error: TypeError: e.setReceipt is not a function
This commit is contained in:
parent
fbc42b6dab
commit
5f8cd976e6
3 changed files with 19 additions and 17 deletions
10
state.js
10
state.js
|
@ -85,6 +85,16 @@ export function getServerName(server, bouncerNetwork) {
|
|||
}
|
||||
}
|
||||
|
||||
export function receiptFromMessage(msg) {
|
||||
// At this point all messages are supposed to have a time tag.
|
||||
// App.addMessage ensures this is the case even if the server doesn't
|
||||
// support server-time.
|
||||
if (!msg.tags.time) {
|
||||
throw new Error("Missing time message tag");
|
||||
}
|
||||
return { time: msg.tags.time };
|
||||
}
|
||||
|
||||
export function isMessageBeforeReceipt(msg, receipt) {
|
||||
if (!receipt) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue