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

@@ -463,7 +463,7 @@ function decryptSticker(packKey: string, ciphertext: Uint8Array): Uint8Array {
async function downloadSticker(
packId: string,
packKey: string,
proto: Proto.StickerPack.ISticker,
proto: Proto.StickerPack.Sticker.Params,
{ ephemeral }: { ephemeral?: boolean } = {}
): Promise<Omit<StickerFromDBType, 'isCoverOnly'>> {
const { id, emoji } = proto;
@@ -628,7 +628,7 @@ export async function downloadEphemeralPack(
stickerPackAdded(pack);
const downloadStickerJob = async (
stickerProto: Proto.StickerPack.ISticker
stickerProto: Proto.StickerPack.Sticker.Params
): Promise<boolean> => {
let stickerInfo;
try {
@@ -793,10 +793,10 @@ async function doDownloadStickerPack(
return;
}
let coverProto: Proto.StickerPack.ISticker | undefined;
let coverProto: Proto.StickerPack.Sticker.Params | undefined;
let coverStickerId: number | undefined;
let coverIncludedInList = false;
let nonCoverStickers: Array<Proto.StickerPack.ISticker> = [];
let nonCoverStickers: Array<Proto.StickerPack.Sticker.Params> = [];
try {
// Synchronous placeholder to help with race conditions
@@ -891,7 +891,7 @@ async function doDownloadStickerPack(
// and we want to preserve more of the pack on an error.
try {
const downloadStickerJob = async (
stickerProto: Proto.StickerPack.ISticker
stickerProto: Proto.StickerPack.Sticker.Params
): Promise<boolean> => {
try {
const stickerInfo = await downloadSticker(