changing some code.

pull/1966/head
Warrick Corfe-Tan 4 years ago
parent 3c7c3220a1
commit ff1d7cefe4

@ -9,11 +9,7 @@ import { getConversationController } from '../session/conversations';
import { ConversationModel, ConversationTypeEnum } from '../models/conversation';
import { MessageModel } from '../models/message';
import { getMessageById, getMessagesBySentAt } from '../../ts/data/data';
import {
markConversationFullyRead,
MessageModelPropsWithoutConvoProps,
messagesAdded,
} from '../state/ducks/conversations';
import { MessageModelPropsWithoutConvoProps, messagesAdded } from '../state/ducks/conversations';
import { updateProfileOneAtATime } from './dataMessage';
import Long from 'long';
@ -251,11 +247,9 @@ function handleSyncedReceipts(message: MessageModel, conversation: ConversationM
message.set({ recipients });
// If the newly received message is from us, we assume that we've seen the messages up until that point
const receivedTimestamp = message.get('received_at');
if (receivedTimestamp) {
conversation.markReadBouncy(receivedTimestamp).then(() => {
window?.inboxStore?.dispatch(markConversationFullyRead(conversation.id));
});
const sentTimestamp = message.get('sent_at');
if (sentTimestamp) {
conversation.markRead(sentTimestamp);
}
}

Loading…
Cancel
Save