Use protopiler for protocol buffers

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Fedor Indutny
2026-03-10 15:31:29 -07:00
committed by GitHub
parent b0e19f334e
commit c4ee32e9ee
97 changed files with 6197 additions and 6362 deletions

View File

@@ -3,7 +3,6 @@
import lodash from 'lodash';
import type { SignalService as Proto } from '../protobuf/index.std.js';
import {
BodyRange,
type RawBodyRange,
@@ -26,7 +25,7 @@ const MAX_PER_TYPE = 250;
// We drop unknown bodyRanges and remove extra stuff so they serialize properly
export function filterAndClean(
ranges: ReadonlyArray<Proto.IBodyRange | RawBodyRange> | undefined | null
ranges: ReadonlyArray<RawBodyRange> | undefined | null
): ReadonlyArray<RawBodyRange> | undefined {
if (!ranges) {
return undefined;
@@ -108,7 +107,7 @@ export function filterAndClean(
}
export function hydrateRanges(
ranges: ReadonlyArray<BodyRange<object>> | undefined,
ranges: ReadonlyArray<RawBodyRange> | undefined,
conversationSelector: (id: string) => { id: string; title: string }
): Array<HydratedBodyRangeType> | undefined {
if (!ranges) {