parent
56b4e01709
commit
dca2ff3dcd
@ -0,0 +1,14 @@ |
||||
### |
||||
# Invite is a named function that will replace /invite commands |
||||
# @param {Object} message - The message object |
||||
### |
||||
|
||||
class Invite |
||||
constructor: (command, params, item) -> |
||||
if(command == "invite") |
||||
if _.trim params |
||||
user = Meteor.users.findOne({ username: String(params) }) |
||||
Meteor.runAsUser user._id, -> |
||||
Meteor.call 'joinRoom', item.rid |
||||
|
||||
RocketChat.slashCommands.add 'invite', Invite |
||||
@ -0,0 +1,21 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:slashcommands-invite', |
||||
version: '0.0.1', |
||||
summary: 'Message pre-processor that will translate /me commands', |
||||
git: '' |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.0'); |
||||
|
||||
api.use([ |
||||
'coffeescript', |
||||
'rocketchat:lib@0.0.1' |
||||
]); |
||||
|
||||
api.addFiles('invite.coffee', ['server','client']); |
||||
}); |
||||
|
||||
Package.onTest(function(api) { |
||||
|
||||
}); |
||||
Loading…
Reference in new issue