Skip to content

Commit

Permalink
fix: read indicators for assets in 1:1 conversation (#16697)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemvs authored Jan 31, 2024
1 parent 6a3ce52 commit bcfc55c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/script/event/preprocessor/ReceiptsMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*
*/

import {RECEIPT_MODE} from '@wireapp/api-client/lib/conversation/data';

import {ConfirmationEvent} from 'src/script/conversation/EventBuilder';
import {User} from 'src/script/entity/User';
import {getLogger, Logger} from 'Util/Logger';
Expand Down Expand Up @@ -52,10 +50,7 @@ export class ReceiptsMiddleware implements EventMiddleware {
case ClientEvent.CONVERSATION.MESSAGE_ADD: {
const qualifiedConversation = event.qualified_conversation || {domain: '', id: event.conversation};
return this.conversationRepository.getConversationById(qualifiedConversation).then(conversation => {
if (conversation && conversation.isGroup()) {
const expectsReadConfirmation = conversation.receiptMode() === RECEIPT_MODE.ON;
event.data.expects_read_confirmation = !!expectsReadConfirmation;
}
event.data.expects_read_confirmation = this.conversationRepository.expectReadReceipt(conversation);
return event;
});
}
Expand Down

0 comments on commit bcfc55c

Please sign in to comment.