mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Unify MessageReceiver and MessageReceiverInner
This commit is contained in:
@@ -2873,17 +2873,8 @@ export async function startApp(): Promise<void> {
|
||||
const details = ev.groupDetails;
|
||||
const { id } = details;
|
||||
|
||||
const idBuffer = id;
|
||||
const idBytes = idBuffer.byteLength;
|
||||
if (idBytes !== 16) {
|
||||
window.log.error(
|
||||
`onGroupReceived: Id was ${idBytes} bytes, expected 16 bytes. Dropping group.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const conversation = await window.ConversationController.getOrCreateAndWait(
|
||||
Bytes.toBinary(id),
|
||||
id,
|
||||
'group'
|
||||
);
|
||||
if (isGroupV2(conversation.attributes)) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -119,8 +119,13 @@ export class ContactSyncEvent extends Event {
|
||||
}
|
||||
}
|
||||
|
||||
export type GroupEventData = Omit<ModifiedGroupDetails, 'id'> &
|
||||
Readonly<{
|
||||
id: string;
|
||||
}>;
|
||||
|
||||
export class GroupEvent extends Event {
|
||||
constructor(public readonly groupDetails: ModifiedGroupDetails) {
|
||||
constructor(public readonly groupDetails: GroupEventData) {
|
||||
super('group');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user