Added /leave and alternate /part

pull/667/head
Aaron 10 years ago
parent d27138da31
commit 7dd7924c76
  1. 1
      .meteor/packages
  2. 1
      .meteor/versions
  3. 3
      packages/meteor-accounts-saml/.npm/package/npm-shrinkwrap.json
  4. 21
      packages/rocketchat-slashcommands-leave/leave.coffee
  5. 20
      packages/rocketchat-slashcommands-leave/package.js

@ -38,6 +38,7 @@ rocketchat:me
rocketchat:mentions
rocketchat:oembed
rocketchat:slashcommands-invite
rocketchat:slashcommands-leave
rocketchat:statistics
rocketchat:webrtc
#rocketchat:external

@ -116,6 +116,7 @@ rocketchat:me@0.0.1
rocketchat:mentions@0.0.1
rocketchat:oembed@0.0.1
rocketchat:slashcommands-invite@0.0.1
rocketchat:slashcommands-leave@0.0.1
rocketchat:statistics@0.0.1
rocketchat:webrtc@0.0.1
routepolicy@1.0.5

@ -54,9 +54,6 @@
"xml-crypto": {
"version": "0.6.0",
"dependencies": {
"xmldom": {
"version": "0.1.19"
},
"xpath.js": {
"version": "1.0.6"
}

@ -0,0 +1,21 @@
###
# Leave is a named function that will replace /leave commands
# @param {Object} message - The message object
###
if Meteor.isClient
RocketChat.slashCommands.add 'leave', undefined,
description: 'Leave the current channel'
params: ''
RocketChat.slashCommands.add 'part', undefined,
description: 'Leave the current channel'
params: ''
else
class Leave
constructor: (command, params, item) ->
if(command == "leave" || command == "part")
Meteor.call 'leaveRoom', item.rid
RocketChat.slashCommands.add 'leave', Leave
RocketChat.slashCommands.add 'part', Leave

@ -0,0 +1,20 @@
Package.describe({
name: 'rocketchat:slashcommands-leave',
version: '0.0.1',
summary: 'Message pre-processor that will translate /leave commands',
git: ''
});
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use([
'coffeescript',
'rocketchat:lib@0.0.1'
]);
api.addFiles('leave.coffee');
});
Package.onTest(function(api) {
});
Loading…
Cancel
Save