Early preparations for PNP Contact Merging
This commit is contained in:
parent
2f5dd73e58
commit
faf6c41332
30 changed files with 1572 additions and 447 deletions
|
@ -1354,12 +1354,10 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
|||
message: {
|
||||
attachments: message.attachments || [],
|
||||
conversationId:
|
||||
window.ConversationController.get(
|
||||
window.ConversationController.ensureContactIds({
|
||||
uuid: message.sourceUuid,
|
||||
e164: message.source,
|
||||
})
|
||||
)?.id || message.conversationId,
|
||||
window.ConversationController.lookupOrCreate({
|
||||
uuid: message.sourceUuid,
|
||||
e164: message.source,
|
||||
})?.id || message.conversationId,
|
||||
id: message.id,
|
||||
received_at: message.received_at,
|
||||
received_at_ms: Number(message.received_at_ms),
|
||||
|
@ -1816,12 +1814,10 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
|||
attachments: message.get('attachments') || [],
|
||||
id: message.get('id'),
|
||||
conversationId:
|
||||
window.ConversationController.get(
|
||||
window.ConversationController.ensureContactIds({
|
||||
uuid: message.get('sourceUuid'),
|
||||
e164: message.get('source'),
|
||||
})
|
||||
)?.id || message.get('conversationId'),
|
||||
window.ConversationController.lookupOrCreate({
|
||||
uuid: message.get('sourceUuid'),
|
||||
e164: message.get('source'),
|
||||
})?.id || message.get('conversationId'),
|
||||
received_at: message.get('received_at'),
|
||||
received_at_ms: Number(message.get('received_at_ms')),
|
||||
sent_at: message.get('sent_at'),
|
||||
|
@ -2116,16 +2112,16 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
|||
}
|
||||
|
||||
startConversation(e164: string, uuid: UUIDStringType): void {
|
||||
const conversationId = window.ConversationController.ensureContactIds({
|
||||
const conversation = window.ConversationController.lookupOrCreate({
|
||||
e164,
|
||||
uuid,
|
||||
});
|
||||
strictAssert(
|
||||
conversationId,
|
||||
conversation,
|
||||
`startConversation failed given ${e164}/${uuid} combination`
|
||||
);
|
||||
|
||||
this.openConversation(conversationId);
|
||||
this.openConversation(conversation.id);
|
||||
}
|
||||
|
||||
async openConversation(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue