Unify MessageReceiver and MessageReceiverInner
This commit is contained in:
parent
a05d528c1f
commit
9c6343e10d
3 changed files with 356 additions and 367 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue