UNPKG

imessage-parser

Version:

Parse iMessage chat.db attributedBody NSAttributedString format in Node.js

21 lines 1.03 kB
/** * Decode a `message_summary_info` blob from chat.db. * * The blob is a binary plist (bplist00) that Apple's Messages app writes when * a message is edited or unsent. Its top-level keys: * - `ec` — dict of message-part-index → array of edit entries (each with * `t` = typedstream attributed-text blob, `d` = Core Data timestamp) * - `ust` — boolean, true on virtually every row * - `ams` — abbreviated summary of the current/retracted text (if present) * * @returns `editedTexts` — ordered prior revisions extracted from `ec[*][*].t` * (oldest first); empty when no edit history. * `unsent` — true when the message was retracted: no `ec` key * (no edit chain) and `ust` is true, i.e. the body * was removed entirely. */ export declare function parseMessageSummary(buf: Buffer): { editedTexts: string[]; unsent: boolean; }; //# sourceMappingURL=message-summary-parser.d.ts.map