MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / attachReplyContext

Function attachReplyContext

src/server.js:5644–5660  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

5642}
5643
5644async function attachReplyContext(event) {
5645 if (!event.replyMessageId) return event;
5646 try {
5647 const replyContext = await fetchOneBotMessage(event.replyMessageId, event.selfId);
5648 return {
5649 ...event,
5650 replyContext,
5651 isReplyToSelf: Boolean(replyContext?.isSelf)
5652 };
5653 } catch (error) {
5654 return {
5655 ...event,
5656 replyContextError: error.message,
5657 isReplyToSelf: false
5658 };
5659 }
5660}
5661
5662function normalizeOneBotEvent(payload) {
5663 const segments = Array.isArray(payload.message) ? payload.message : [];

Callers 1

handleApiFunction · 0.85

Calls 1

fetchOneBotMessageFunction · 0.85

Tested by

no test coverage detected