keybindings: fix error on alt+h
Fixes the following JS error:
TypeError: e.setReceipt is not a function
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user