imessage-exporter icon indicating copy to clipboard operation
imessage-exporter copied to clipboard

What is `item_type` 4?

Open ReagentX opened this issue 2 years ago • 1 comments

There is an int column in the messages table called item_type. Normal messages are 0, channel announcements that update the room name are 2. I have a third item_type in my database, "aptly" named 4, and it seems to be a fully null message (no text or blob data, no associated message, nothing). What does 4 represent? Is there a 1?

ReagentX avatar Jul 16 '22 04:07 ReagentX

item_type 6 is used for SharePlay/FaceTime message balloons. Support for parsing this field was added in #57.

ReagentX avatar Jan 13 '23 16:01 ReagentX

Screenshot_20230211_105617_GitHub.png

Here's some more details on what item type and group action type combinations are

tneotia avatar Feb 12 '23 17:02 tneotia

This is great, how did the BlueBubbles team figure this out? Some of these I already support because you can deduce the context from other columns.

ReagentX avatar Feb 12 '23 19:02 ReagentX

I'd love to say there's some cool trickery behind it, but honestly it was just a brute force type thing. We sent as many "group event" type messages as we could figure out, then went in the chat.db and saw what item types and group action types they were labeled to.

If we ever get one we haven't added support for, we usually just have the person go into their iMessage app and see what it says there, and then ask them to send us the json message object stored on their app, which is visible to users for debug purposes.

It may be possible to deduce this more accurately from disassembling Messages.app, we have a contributor who has done this and uncovered some really interesting things.

tneotia avatar Feb 12 '23 20:02 tneotia

That sounds about like what my experience is like!

ReagentX avatar Feb 12 '23 20:02 ReagentX