Open tylerkerr opened 9 years ago
Yeah, i can't get it to work either.
TypeError: Cannot read property 'split' of undefined
at iMessageAdapter.run (/Users/KingScooty/Desktop/hubot/node_modules/hubot-imessage/src/imessage.coffee:23:55, <js>:51:61)
at Robot.run (/Users/KingScooty/Desktop/hubot/node_modules/hubot/src/robot.coffee:443:5, <js>:397:27)
at Object.<anonymous> (/Users/KingScooty/Desktop/hubot/node_modules/hubot/bin/hubot:135:8, <js>:146:11)
at Object.<anonymous> (/Users/KingScooty/Desktop/hubot/node_modules/hubot/bin/hubot:5:1, <js>:149:4)
at Module._compile (module.js:460:26)
@KingScooty @tylerkerr Either of you solve this?
No, unfortunately not! This would have been for a pet project so I didn't spent too long digging into it.
I managed to get past the Cannot read property 'split' of undefined
error by setting the ENV variable HUBOT_IMESSAGE_HANDLES
. This is the whitelist that the hubot will listen too and takes in the email or number of the imessage.
@Vannilaknight So you got everything working? I'm adding my relevant emails and phone numbers to HUBOT_IMESSAGE_HANDLES
via export HUBOT_IMESSAGE_HANDLES=E:steve@mac.com,...
, but still getting Cannot read property 'split' of undefined
error. Thank very much for any help you might be able to provide.
Looks like Messages was changed a fair amount in Yosemite. Only one handler script can be assigned, and it must be in ~/Library/Application Scripts/com.apple.iChat/. I've tried both copying and symlinking messageReceived.scpt there, but get a pretty generic error when receiving an iMessage:
Event: Message Received in Active Chat File: messageReceived.scpt Error: The operation couldn’t be completed. /Users/xbmc/Library/Application Scripts/com.apple.iChat/messageReceived.scpt: execution error: No error. (-1708)
I assume this is due to Apple's usual point release musical chairs, but it's possible I've done something wrong...