MCPcopy
hub / github.com/maxchehab/phelia / parseMessageKey

Function parseMessageKey

src/core/utils.ts:75–84  ·  view source on GitHub ↗
(payload: any)

Source from the content-addressed store, hash-verified

73
74/** Get a unique key from a message payload */
75export function parseMessageKey(payload: any) {
76 if (payload?.view?.id) {
77 return payload.view.id;
78 }
79
80 if (payload.container) {
81 const { channel_id, message_ts, view_id, type } = payload.container;
82 return type === "view" ? view_id : `${channel_id}:${message_ts}`;
83 }
84}
85
86/** Transform a message into message metadata */
87export function loadMessagesFromArray(

Callers 3

appHomeHandlerMethod · 0.90
processActionMethod · 0.90
processOptionMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected