Skip to content

Make channelName optional for events triggered on channel instance#23

Open
bfischer1121 wants to merge 2 commits intopusher:masterfrom
bfischer1121:optional-channel-name
Open

Make channelName optional for events triggered on channel instance#23
bfischer1121 wants to merge 2 commits intopusher:masterfrom
bfischer1121:optional-channel-name

Conversation

@bfischer1121
Copy link

Description

Currently the readme allows for triggering events on the channel instance without specifying the channelName property. This makes sense, so this implements that functionality.

CHANGELOG

  • [CHANGED] Make channelName optional for events triggered on channel instance

Keith-wright pushed a commit that referenced this pull request Mar 16, 2026
PusherChannel.trigger() now accepts an event without channelName,
defaulting to the channel's own name, aligning with the documented API.

removeAllListeners() now correctly removes all 7 event listeners;
ON_CONNECTION_STATE_CHANGE and ON_SUBSCRIPTION_ERROR were previously
not cleared on init() and reset() calls, causing stale listeners to
accumulate. Adds an initial Jest test suite covering both fixes.

Supersedes #23, #157. Closes #167, #182.
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