Skip to content

Instantly share code, notes, and snippets.

@Mattchewone Mattchewone/service.js Secret
Created Feb 12, 2019

Embed
What would you like to do?
const service = app.service('messages')
service.hooks(hooks)
// Publish events
service.publish((data, context) => {
// Filter the channels to only authenticated
return app.channel(`room/${data.roomId}`)
.filter(connection => connection.user._id.toString() !== data.userId.toString())
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.