-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Environment
[email protected]
β h3@@1.15.4
β [email protected]
Reproduction
Use peer.publish
Describe the bug
According to the documentation, peer.publish broadcasts a message to the subscribers of the given channel. However, I noticed that the peer that triggered the publish itself never received the message, even though it was subscribed to the channel.
Additional context
On closer look, it looks like this was implemented intentionally here:
Line 179 in 84cf679
| if (peer !== this && peer._topics.has(topic)) { |
as it explicitly checks if the peer isn't the current peer before sending the message. Not entirely sure if this is a bug or a 'feature'; depending on that this is either a bug report or a request for better documentation. Happy to open a PR for either of those :)
Logs
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request