BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
554 stars 47 forks source link

Help: chatGuid + and - meaning #681

Open User8395 opened 3 months ago

User8395 commented 3 months ago

When sending a message via the REST API, the chatGuid is as follows

"chatGuid": "iMessage;-;email@email.com"

My question is why is there a minus in the middle and sometimes a plus, and why is the "Chat does not exist" error thrown when using a plus instead of a minus?

mehapps commented 3 months ago

So i dont think I've personally seen a + before in the chatGuid, would u happen to have an example of this? (not a bb dev though so I have WAY WAY less knowledge abt how imessage works)

User8395 commented 3 months ago

So i dont think I've personally seen a + before in the chatGuid, would u happen to have an example of this? (not a bb dev though so I have WAY WAY less knowledge abt how imessage works)

20240817_130217.jpg

zlshames commented 3 months ago

DMs will be iMessage;-;{address} while group chats are iMessage;+;chat{number}

User8395 commented 3 months ago

DMs will be iMessage;-;{address} while group chats are iMessage;+;chat{number}

Can you give an example of sending to a group with 1234567890, bob@bob.com, and 6666666666?

mehapps commented 3 months ago

I guess then you would get the chatguid from that group (I usually get it through a new-message webphook) and then use it

User8395 commented 3 months ago

I guess then you would get the chatguid from that group (I usually get it through a new-message webphook) and then use it

How would that work? Does it show the guid when listing chats?

zlshames commented 3 months ago

Yeah get the chat guid from an API call or something. If you have a group chat name, it'll be easily identifiable from the chat endpoint

mehapps commented 3 months ago

I guess then you would get the chatguid from that group (I usually get it through a new-message webphook) and then use it

How would that work? Does it show the guid when listing chats?

I setup the new-message webhook and then an HTTP server (there should be an example in python somewhere) then I would wait for a message from that group chat. Once it arrives look at the logs and see what the chatGUID is. There's probably a different way to do it (maybe you could send a message to the group chat and use message updates