Skip to content

Conversation

@philaris
Copy link

Hi, keybase team and contributors and thank you for the nice code.

I have been trying to implement a bot with the following property: it receives commands from the same username as the one under which the bot runs. It can be the case that the sender of the messages is on the same device as the bot. Therefore, in order to read messages of the aforementioned type, showLocal has to be set to true in the ListenOptions argument to watchChannelForNewMessages (otherwise such messages are ignored). However, if showLocal is true, then messages from the same device are reported twice from watchChannelForNewMessages.

I investigated and it seems that each message from a same-device sender triggers two message notifications one with source: "local" and the other with source: "remote". Therefore, I added an optional field ignoreSourceLocal to the ListenOptions interface with which the source: "local" copy of the message is suppressed (when ignoreSourceLocal is set to true).

This pull request passes all tests except the one mentioned in #221 which also seems not to pass for the base branch.

@philaris philaris force-pushed the ignore-source-local branch 2 times, most recently from cd5c2f2 to 59306bc Compare February 28, 2020 17:01
@philaris philaris force-pushed the ignore-source-local branch 2 times, most recently from ee48d21 to 8ab2a88 Compare March 7, 2020 11:18
@philaris philaris force-pushed the ignore-source-local branch from 8ab2a88 to 0da063f Compare March 7, 2020 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant