Skip to content

Extract create channel logic to separate function that doesn't require a logged in user #455

@rwakida

Description

@rwakida

Use case:
Allows automated, anonymous channel creation on the server. For example, we create a channel based on a user's location, and automatically add the user to the channel.

The logic to validate name and create the room and subscriptions in the createChannel Meteor method would be extracted to a non-exposed serverside function that accepts name, members, and an optional creator. The createChannel Meteor method would check that the Meteor.userId() exists then delegate to the extracted method. The backend "bots" would call the extracted method and optionally pass a user as the room creator. We would also need #454 to be implemented

Questions:

  1. beforeCreateChannel hook passes the channel creator. Who would we pass? Looks like irc.server.coffee's IrcClient expects a user.
  2. Is it okay to have a channel without a creator? The general channel doesn't have a creator.
  3. Could have ghost rooms with no members.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions