destinationServiceId in Sent
This commit is contained in:
parent
af4ad55c68
commit
f90c2b7479
20 changed files with 322 additions and 104 deletions
|
@ -149,6 +149,7 @@ import { themeChanged } from './shims/themeChanged';
|
|||
import { createIPCEvents } from './util/createIPCEvents';
|
||||
import { RemoveAllConfiguration } from './types/RemoveAllConfiguration';
|
||||
import { isValidUuid, UUIDKind, UUID } from './types/UUID';
|
||||
import type { TaggedUUIDStringType } from './types/UUID';
|
||||
import * as log from './logging/log';
|
||||
import { loadRecentEmojis } from './util/loadRecentEmojis';
|
||||
import { deleteAllLogs } from './util/deleteAllLogs';
|
||||
|
@ -2463,7 +2464,9 @@ export async function startApp(): Promise<void> {
|
|||
message: data.message,
|
||||
// 'message' event: for 1:1 converations, the conversation is same as sender
|
||||
destination: data.source,
|
||||
destinationUuid: data.sourceUuid,
|
||||
destinationUuid: {
|
||||
aci: data.sourceUuid,
|
||||
},
|
||||
});
|
||||
|
||||
const { PROFILE_KEY_UPDATE } = Proto.DataMessage.Flags;
|
||||
|
@ -2699,11 +2702,9 @@ export async function startApp(): Promise<void> {
|
|||
result: SendStateByConversationId,
|
||||
{ destinationUuid, destination, isAllowedToReplyToStory }
|
||||
) => {
|
||||
const conversation = window.ConversationController.lookupOrCreate({
|
||||
uuid: destinationUuid,
|
||||
e164: destination,
|
||||
reason: 'createSentMessage',
|
||||
});
|
||||
const conversation = window.ConversationController.get(
|
||||
destinationUuid?.aci || destinationUuid?.pni || destination
|
||||
);
|
||||
if (!conversation || conversation.id === ourId) {
|
||||
return result;
|
||||
}
|
||||
|
@ -2729,7 +2730,12 @@ export async function startApp(): Promise<void> {
|
|||
if (unidentifiedStatus.length) {
|
||||
unidentifiedDeliveries = unidentifiedStatus
|
||||
.filter(item => Boolean(item.unidentified))
|
||||
.map(item => item.destinationUuid || item.destination)
|
||||
.map(
|
||||
item =>
|
||||
item.destinationUuid?.aci ||
|
||||
item.destinationUuid?.pni ||
|
||||
item.destination
|
||||
)
|
||||
.filter(isNotNil);
|
||||
}
|
||||
|
||||
|
@ -2770,7 +2776,7 @@ export async function startApp(): Promise<void> {
|
|||
}: {
|
||||
message: ProcessedDataMessage;
|
||||
destination?: string;
|
||||
destinationUuid?: string;
|
||||
destinationUuid?: TaggedUUIDStringType;
|
||||
}): MessageDescriptor => {
|
||||
if (message.groupV2) {
|
||||
const { id } = message.groupV2;
|
||||
|
@ -2810,11 +2816,9 @@ export async function startApp(): Promise<void> {
|
|||
};
|
||||
}
|
||||
|
||||
const conversation = window.ConversationController.lookupOrCreate({
|
||||
uuid: destinationUuid,
|
||||
e164: destination,
|
||||
reason: `getMessageDescriptor(${message.timestamp}): private`,
|
||||
});
|
||||
const conversation = window.ConversationController.get(
|
||||
destinationUuid?.aci || destinationUuid?.pni || destination
|
||||
);
|
||||
strictAssert(conversation, 'Destination conversation cannot be created');
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue