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
|
@ -16,7 +16,7 @@ import ScrollManager from "./scroll-manager.js";
|
|||
import Dialog from "./dialog.js";
|
||||
import { html, Component, createRef } from "../lib/index.js";
|
||||
import { strip as stripANSI } from "../lib/ansi.js";
|
||||
import { SERVER_BUFFER, BufferType, ReceiptType, ServerStatus, Unread, State, getServerName, isMessageBeforeReceipt } from "../state.js";
|
||||
import { SERVER_BUFFER, BufferType, ReceiptType, ServerStatus, Unread, State, getServerName, receiptFromMessage, isMessageBeforeReceipt } from "../state.js";
|
||||
import commands from "../commands.js";
|
||||
import { setup as setupKeybindings } from "../keybindings.js";
|
||||
import * as store from "../store.js";
|
||||
|
@ -133,16 +133,6 @@ function showNotification(title, options) {
|
|||
}
|
||||
}
|
||||
|
||||
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 };
|
||||
}
|
||||
|
||||
function getReceipt(stored, type) {
|
||||
if (!stored || !stored.receipts) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue