fix(dispatcher): fixed field names because webstorm sucks

This commit is contained in:
teidesu 2021-05-11 22:34:13 +03:00
parent 5b3d7a3b09
commit 46973c4830

View file

@ -287,7 +287,7 @@ export namespace filters {
* Filter messages generated by yourself (including Saved Messages)
*/
export const me: UpdateFilter<Message, { sender: User }> = (msg) =>
(msg.sender instanceof User && msg.sender.isSelf) || msg.outgoing
(msg.sender instanceof User && msg.sender.isSelf) || msg.isOutgoing
/**
* Filter messages sent by bots
@ -308,16 +308,16 @@ export namespace filters {
*
* Messages sent to yourself (i.e. Saved Messages) are also "incoming"
*/
export const incoming: UpdateFilter<Message, { outgoing: false }> = (msg) =>
!msg.outgoing
export const incoming: UpdateFilter<Message, { isOutgoing: false }> = (msg) =>
!msg.isOutgoing
/**
* Filter outgoing messages.
*
* Messages sent to yourself (i.e. Saved Messages) are **not** "outgoing"
*/
export const outgoing: UpdateFilter<Message, { outgoing: true }> = (msg) =>
msg.outgoing
export const outgoing: UpdateFilter<Message, { isOutgoing: true }> = (msg) =>
msg.isOutgoing
/**
* Filter messages that are replies to some other message