Cleanup: Reactions, Delete for Everyone
This commit is contained in:
parent
e8759fc81b
commit
29eaa7b9a2
4 changed files with 29 additions and 27 deletions
|
@ -610,16 +610,7 @@ export class ConversationController {
|
|||
const messages = await getMessagesBySentAt(targetTimestamp, {
|
||||
MessageCollection: window.Whisper.MessageCollection,
|
||||
});
|
||||
const targetMessage = messages.find(m => {
|
||||
const contact = m.getContact();
|
||||
|
||||
if (!contact) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const mcid = contact.get('id');
|
||||
return mcid === targetFromId;
|
||||
});
|
||||
const targetMessage = messages.find(m => m.getContactId() === targetFromId);
|
||||
|
||||
if (targetMessage) {
|
||||
return targetMessage.getConversation();
|
||||
|
|
|
@ -2607,6 +2607,12 @@ type WhatIsThis = typeof window.WhatIsThis;
|
|||
const message = initIncomingMessage(data, messageDescriptor);
|
||||
|
||||
if (data.message.reaction) {
|
||||
window.normalizeUuids(
|
||||
data.message.reaction,
|
||||
['targetAuthorUuid'],
|
||||
'background::onMessageReceived'
|
||||
);
|
||||
|
||||
const { reaction } = data.message;
|
||||
window.log.info(
|
||||
'Queuing incoming reaction for',
|
||||
|
@ -2814,6 +2820,12 @@ type WhatIsThis = typeof window.WhatIsThis;
|
|||
const message = createSentMessage(data, messageDescriptor);
|
||||
|
||||
if (data.message.reaction) {
|
||||
window.normalizeUuids(
|
||||
data.message.reaction,
|
||||
['targetAuthorUuid'],
|
||||
'background::onSentMessage'
|
||||
);
|
||||
|
||||
const { reaction } = data.message;
|
||||
window.log.info('Queuing sent reaction for', reaction.targetTimestamp);
|
||||
const reactionModel = window.Whisper.Reactions.add({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue