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

Function findMessageIDMaxLength

lib/shared/id-utils.js:37–47  ·  view source on GitHub ↗
(messageIDs: $ReadOnlyArray<?string>)

Source from the content-addressed store, hash-verified

35}
36
37function findMessageIDMaxLength(messageIDs: $ReadOnlyArray<?string>): number {
38 let result = 0;
39 for (const id of messageIDs) {
40 if (!id || id.startsWith(localIDPrefix)) {
41 continue;
42 }
43
44 result = Math.max(result, id.length);
45 }
46 return result;
47}
48
49function extendMessageID(id: ?string, length: number): ?string {
50 if (!id || id.startsWith(localIDPrefix)) {

Callers 2

sortMessageInfoListFunction · 0.85
sortMessageIDsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected