Skip to content

truncateBlipPayload

truncateBlipPayload(payload): BlipPayload

Applies the truncation limits from the runtime protocol guide (“Rules”): actions to MAX_ACTIONS, facts to MAX_FACTS, list items to MAX_LIST_ITEMS (and each item’s actions to MAX_ITEM_ACTIONS), a checklist’s items to MAX_CHECKLIST_ITEMS, a note’s text to MAX_NOTE_CHARS, a progress’s stages to MAX_STAGES, meter meters to MAX_METERS, and stat series to MAX_SERIES_POINTS, keeping the most recent points, since a sparkline that dropped its newest data would lie. Lines of text (titles, subtitles, list rows, facts, a progress step and its stages, a score’s event) are cut to MAX_TEXT_CHARS. Does not check the 4KB size limit; callers measure the JSON after truncating.

Parameter Type
payload BlipPayload

BlipPayload