MCPcopy Create free account
hub / github.com/block/buzz / isMockTopLevelRow

Function isMockTopLevelRow

desktop/src/testing/e2eBridge.ts:2825–2832  ·  view source on GitHub ↗

* Mirror the relay's channel-window row set (buzz-db `thread.rs`, NIP-CW * §Top-level Classification): an event is a timeline row iff its depth is 0 * (no reply marker → `rootEventId === null`) OR its depth is 1 (its parent is * the thread root) AND it is broadcast. Depth ≥ 2 replies never surfac

(event: RelayEvent)

Source from the content-addressed store, hash-verified

2823 * depth-1 replies the real relay serves.
2824 */
2825function isMockTopLevelRow(event: RelayEvent): boolean {
2826 const { parentEventId, rootEventId } = getThreadReferenceFromTags(event.tags);
2827 if (rootEventId === null) {
2828 return true;
2829 }
2830 const isDepthOne = parentEventId !== null && parentEventId === rootEventId;
2831 return isDepthOne && isMockBroadcastReply(event.tags);
2832}
2833
2834function appendMentionTags(
2835 tags: string[][],

Callers 2

executeFunction · 0.85

Calls 2

isMockBroadcastReplyFunction · 0.85

Tested by

no test coverage detected