Add wildcard support to RPS.publish channels#2
Open
ggn06awu wants to merge 7 commits intochatr:masterfrom
Open
Add wildcard support to RPS.publish channels#2ggn06awu wants to merge 7 commits intochatr:masterfrom
ggn06awu wants to merge 7 commits intochatr:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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: