RocketChat / hubot-rocketchat

Rocket.Chat Hubot adapter
MIT License
578 stars 227 forks source link

Use robot.adapter.CallMethod with custom method #324

Closed qhu91it closed 5 years ago

qhu91it commented 5 years ago

I create a custom method follow at server/methods/myCustomMethod.js, and in server/main.js I import

import './methods/myCustomMethod';

I call in react native app by this.sdk.methodCall('getMyMethod'); and it work, but when I call in hubot as robot.adapter.callMethod('getMyMethod') then I got error

{ isClientSafe: true,
  error: 400,
  reason: 'Match failed',
  message: 'Match failed [400]',
  errorType: 'Meteor.Error' }

What I'm missing?

qhu91it commented 5 years ago

I resolve this by creating the function in bot helper, I close this issue, sorry and thank.