Skip to content

Conversation

@ggn06awu
Copy link

We wanted to listen on channels using wildcards, so I have added that code to your messenger as I believe it should work. Would you please consider this and add if you're happy? Example usage:

RPS.publish(this, {
      collection: Comments,
      options: {
        selector: {contextId: contextId},
        channel: 'comments::' + contextId + '::*'
      }
    });

ggn06awu and others added 7 commits January 13, 2016 09:15
We need to be able to listen on channel with a wildcard, the work around would have meant us creating far too many channels. This code lets us listen to channels like so:

RPS.publish(this, {
      collection: Comments,
      options: {
        selector: {contextId: contextId},
        channel: 'comments::' + contextId + '::*'
      }
    });

Creating a pull request to merge this to chatra's original version.
Seems like the Redis routine wont work when sending messages through without some sort of ID. For something like an ephemeral chat message, there's no reason for an ID to exist, added this patch to let them fall through.
The wildcard support was only working for one wildcard, this change allows support of multiple wildcards in the pattern as originally intended.
Conflicts:
	messenger.js
	observe-changes.js
Restoring a unique package name from chatr's original code, to avoid meteor collisions.
Correcting the GIT source.
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