lazerwalker / hubot-imessage

iMessage adapter for Hubot
MIT License
172 stars 31 forks source link

Tie-in scripts incompatible with Yosemite Messages #6

Open tylerkerr opened 9 years ago

tylerkerr commented 9 years ago

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...

KingScooty commented 9 years ago

Yeah, i can't get it to work either.

KingScooty commented 9 years ago
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)
thebucknerlife commented 8 years ago

@KingScooty @tylerkerr Either of you solve this?

tylerkerr commented 8 years ago

No, unfortunately not! This would have been for a pet project so I didn't spent too long digging into it.

Vannilaknight commented 8 years ago

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.

johnerik commented 8 years ago

@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.