Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 totrue
in theListenOptions
argument towatchChannelForNewMessages
(otherwise such messages are ignored). However, ifshowLocal
istrue
, then messages from the same device are reported twice fromwatchChannelForNewMessages
.I investigated and it seems that each message from a same-device sender triggers two message notifications one with
source: "local"
and the other withsource: "remote"
. Therefore, I added an optional fieldignoreSourceLocal
to theListenOptions
interface with which thesource: "local"
copy of the message is suppressed (whenignoreSourceLocal
is set totrue
).This pull request passes all tests except the one mentioned in #221 which also seems not to pass for the base branch.