|
|
|
@ -248,13 +248,18 @@ async function handleRegularMessage(
|
|
|
|
|
|
|
|
|
|
|
|
if (type === 'incoming') {
|
|
|
|
if (type === 'incoming') {
|
|
|
|
updateReadStatus(message, conversation);
|
|
|
|
updateReadStatus(message, conversation);
|
|
|
|
|
|
|
|
if (conversation.isPrivate()) {
|
|
|
|
await conversation.setDidApproveMe(true);
|
|
|
|
await conversation.setDidApproveMe(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (type === 'outgoing') {
|
|
|
|
if (type === 'outgoing') {
|
|
|
|
await handleSyncedReceipts(message, conversation);
|
|
|
|
await handleSyncedReceipts(message, conversation);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (conversation.isPrivate()) {
|
|
|
|
await conversation.setIsApproved(true);
|
|
|
|
await conversation.setIsApproved(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const conversationActiveAt = conversation.get('active_at');
|
|
|
|
const conversationActiveAt = conversation.get('active_at');
|
|
|
|
if (!conversationActiveAt || (message.get('sent_at') || 0) > conversationActiveAt) {
|
|
|
|
if (!conversationActiveAt || (message.get('sent_at') || 0) > conversationActiveAt) {
|
|
|
|
|