Hubot Mattermost可能与hubot@3.0.1不兼容吗?

时间:2018-07-16 14:38:09

标签: node.js hubot mattermost

我正在尝试升级我所有的Hubot,因此我选择了hubot@3.0.1。这在这里产生错误:hubot-matteruser / src / matteruser.coffee 我只是想升级我所有的hubot东西,所以我选择了hubot@3.0.1。这在这里产生了错误:

Line 201 in fdf4cdb
 if msg.data.sender_name in @mmIgnoreUsers 

I commented this line out to see if it the ignored users. The error just shifted to just a few lines later:

hubot-matteruser/src/matteruser.coffee

Line 207 in fdf4cdb
 mmUser = @client.getUserByID mmPost.user_id 

INFO Someone is typing...
DEBUG Message {
  event: 'posted',
  data:
   { channel_display_name: '',
     channel_name: 'my8---redacted---br6c',
     channel_type: 'D',
     mentions: '["no4--redacted--br6c"]',
     post: '{"id":"ke3----tc","create_at":1522146010510,"update_at":1522146010510,"edit_at":0,"delete_at":0,"is_pinned":false,"user_id":"my8---t1h9e","channel_id":"rn----wa","root_id":"","parent_id":"","original_id":"","message":"help","type":"","props":{},"hashtags":"","pending_post_id":"my8------h9e:1522146010862"}',
     sender_name: 'mynickname',
     team_id: '' },
  broadcast:
   { omit_users: null,
     user_id: '',
     channel_id: 'rn83---redacted--cwa',
     team_id: '' },
  seq: 4 }
ERROR TypeError: Cannot read property 'getUserByID' of undefined
  at Matteruser.message (--redacted--\node_modules\hubot-matteruser\src\matteruser.coffee:207:18, <js>:289:28)
  at Client.<anonymous> (--redacted--\node_modules\hubot-matteruser\src\matteruser.coffee:1:1, <js>:5:61)
  at Client.emit (events.js:160:13)
  at Client.onMessage (--redacted--\node_modules\mattermost-client\src\client.coffee:279:17, <js>:381:23)
  at WebSocket.<anonymous> (--redacted--\node_modules\mattermost-client\src\client.coffee:224:13, <js>:318:22)
  at WebSocket.emit (events.js:160:13)
  at Receiver.ontext (--redacted--\node_modules\ws\lib\WebSocket.js:841:10)
  at --redacted--\node_modules\ws\lib\Receiver.js:536:18
  at Receiver.applyExtensions (--redacted--\node_modules\ws\lib\Receiver.js:371:5)
  at --redacted--\node_modules\ws\lib\Receiver.js:508:14
  at Receiver.flush (--redacted--\node_modules\ws\lib\Receiver.js:347:3)
  at Receiver.finish (--redacted--\node_modules\ws\lib\Receiver.js:541:12)
  at Receiver.expectHandler (--redacted--\node_modules\ws\lib\Receiver.js:499:31)
  at Receiver.add (--redacted--\node_modules\ws\lib\Receiver.js:103:24)
  at TLSSocket.realHandler (--redacted--\node_modules\ws\lib\WebSocket.js:825:20)
  at TLSSocket.emit (events.js:160:13)
  at addChunk (_stream_readable.js:269:12)
  at readableAddChunk (_stream_readable.js:256:11)
  at TLSSocket.Readable.push (_stream_readable.js:213:10)
  at TLSWrap.onread (net.js:599:20)


[hubot-matteruser/src/matteruser.coffee][1]


  [1]: https://i.stack.imgur.com/QBhGJ.png

0 个答案:

没有答案