Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iMessages sent via AppleScript cannot be received in "Business Chats" – consider implementing conditional Private API send #184

Closed
rollingonchrome opened this issue Feb 15, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rollingonchrome
Copy link

rollingonchrome commented Feb 15, 2024

iMessages sent using the BlueBubbles connector appear to send via AppleScript. This causes those messages to fail to send in Business Chats and generates the following example error in the BlueBubbles server.

Potentially add a conditional to send via Private API under certain circumstances.

Error message:

Command failed: osascript -e "tell application \"Messages\"" -e "set targetService to 1st account whose service type = iMessage" -e "set targetBuddy to participant \"urn:biz:b15ed773-9eed-11e7-baa2-7b88b04daa8e\" of targetService" -e "send \"[MESSAGE CONTENTS]\" to targetBuddy" -e "end tell" 186:225: execution error: Messages got an error: Can’t get participant id "20CCA093-0FE3-45E2-803E-4FF471175B25:urn:biz:b15ed773-9eed-11e7-baa2-7b88b04daa8e". (-1728)

@rollingonchrome rollingonchrome added the bug Something isn't working label Feb 15, 2024
@trek-boldly-go trek-boldly-go added the good first issue Good for newcomers label Feb 16, 2024
@trek-boldly-go
Copy link
Collaborator

Several other send methods are already using this conditional, like the SendFile:
https://github.com/mautrix/imessage/blob/25aaae37d11db8c77ef77693e84ae6ecc847e1f8/imessage/bluebubbles/api.go#L979C1-L985C3

The conditional in the SendMessage just needs updated to match the others:
https://github.com/mautrix/imessage/blob/25aaae37d11db8c77ef77693e84ae6ecc847e1f8/imessage/bluebubbles/api.go#L918C1-L924C3

@trek-boldly-go
Copy link
Collaborator

Closed with #189

@dltacube
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

3 participants