Skip to content

Commit

Permalink
chan: type untyped method params
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnre8 committed Apr 14, 2024
1 parent a1d4990 commit aa6020a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/models/chan.ts
Expand Up @@ -62,8 +62,6 @@ class Chan {

pushMessage(client: Client, msg: Msg, increasesUnread = false) {
const chanId = this.id;
const obj = {chan: chanId, msg, unread: undefined, highlight: undefined};

msg.id = client.idMsg++;

// If this channel is open in any of the clients, do not increase unread counter
Expand Down Expand Up @@ -117,7 +115,7 @@ class Chan {
}
}

dereferencePreviews(messages) {
dereferencePreviews(messages: Msg[]) {
if (!Config.values.prefetch || !Config.values.prefetchStorage) {
return;
}
Expand Down Expand Up @@ -334,7 +332,13 @@ class Chan {
}
}

function requestZncPlayback(channel, network, from) {
function requestZncPlayback(channel: Chan, network: Network, from: number) {
if (!network.irc) {
throw new Error(
`requestZncPlayback: no irc field on network "${network.name}", this is a bug`
);
}

network.irc.raw("ZNC", "*playback", "PLAY", channel.name, from.toString());
}

Expand Down

0 comments on commit aa6020a

Please sign in to comment.