Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CamHenlin/iMessageModule
A node module for sending iMessages on your Mac
https://github.com/CamHenlin/iMessageModule
Last synced: about 1 month ago
JSON representation
A node module for sending iMessages on your Mac
- Host: GitHub
- URL: https://github.com/CamHenlin/iMessageModule
- Owner: CamHenlin
- Created: 2015-04-04T00:54:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-18T07:15:23.000Z (about 3 years ago)
- Last Synced: 2024-10-01T17:20:14.601Z (2 months ago)
- Language: JavaScript
- Size: 2.79 MB
- Stars: 86
- Watchers: 8
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - CamHenlin/iMessageModule - A node module for sending iMessages on your Mac (JavaScript)
README
# Node iMessage Module
## Requires OS X 10.7 or better, and an active iMessage account### What is this?
This is a node module that allows you to send iMessages, assuming you are running on a Mac that's signed in to an iMessage account.### How do I use it in my project?
Like this:
```
var imessagemodule = require("iMessageModule");imessagemodule.sendMessage("recipient email, phone, or chat title", "message text", function(err) {});
```It's really that simple! And you can send the messages as quickly as you like. iMessageModule will queue up them and send them as quickly as Messages.app will allow.
### What's the purpose?
Nothing else on npm seems to deal with group chats correctly. I wanted something to use in my own project that I believed worked reliably and as quickly as possible. This uses an Automator script to run handle interacting with Messages.app. Should work with OS X 10.7 or better.### Why doesn't this handle reading the database?
There's already a pretty good library for that on npm at [imessage](https://www.npmjs.com/package/imessage) but personally I just read the Messages SQLite database directly in my other projects at [imessageclient](https://github.com/CamHenlin/imessageclient), [iMessageWebClient](https://github.com/CamHenlin/iMessageWebClient), and [imessagebot](https://github.com/CamHenlin/imessagebot).## This is clunky!
This would be better if it used some private APIs within OS X, but could be improved to use more. Private APIs within OS X should be able to be used to completely send messages without the use of Messages.app, but I haven't figured out how to do so yet. Right now I am using some private APIs to open a new message window and prefilling the To: field. Maybe you can help out and contribute? Check out [nodeprivatemessageskit](https://github.com/camhenlin/nodeprivatemessageskit) for more info.