MCPcopy Create free account
hub / github.com/CommE2E/comm / generateOpsForThreadUpdates

Function generateOpsForThreadUpdates

lib/shared/updates/join-thread-spec.js:38–52  ·  view source on GitHub ↗
(
    storeThreadInfos: RawThreadInfos,
    update: ThreadJoinUpdateInfo,
  )

Source from the content-addressed store, hash-verified

36 ThreadJoinUpdateData,
37> = Object.freeze({
38 generateOpsForThreadUpdates(
39 storeThreadInfos: RawThreadInfos,
40 update: ThreadJoinUpdateInfo,
41 ) {
42 if (_isEqual(storeThreadInfos[update.threadInfo.id])(update.threadInfo)) {
43 return null;
44 }
45 invariant(
46 update.threadInfo.minimallyEncoded,
47 'update threadInfo must be minimallyEncoded',
48 );
49 return [
50 createReplaceThreadOperation(update.threadInfo.id, update.threadInfo),
51 ];
52 },
53 mergeEntryInfos(
54 entryIDs: Set<string>,
55 mergedEntryInfos: Array<RawEntryInfo>,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected