mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 08:28:17 +01:00
Use protopiler for protocol buffers
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
toTaggedPni,
|
||||
isUntaggedPniString,
|
||||
} from '../../types/ServiceId.std.js';
|
||||
import { isKnownProtoEnumMember } from '../../util/isKnownProtoEnumMember.std.js';
|
||||
import { Migrations as Proto } from '../../protobuf/index.std.js';
|
||||
import { sql } from '../util.std.js';
|
||||
import type { WritableDB } from '../Interface.std.js';
|
||||
@@ -120,7 +121,9 @@ export default function updateToSchemaVersion1280(
|
||||
insertStmt.run({
|
||||
...rest,
|
||||
id,
|
||||
type: decoded.type ?? Proto.Envelope.Type.UNKNOWN,
|
||||
type: isKnownProtoEnumMember(Proto.Envelope.Type, decoded.type)
|
||||
? decoded.type
|
||||
: Proto.Envelope.Type.UNKNOWN,
|
||||
content: content ?? null,
|
||||
isEncrypted: decrypted ? 0 : 1,
|
||||
timestamp: timestamp || Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user