make sure reply is available to read messages
and do not handle read messages for non private convo1
This commit is contained in:
parent
0ebc1d7e92
commit
1ebff6b3ae
|
@ -72,7 +72,7 @@ export const MessageContextMenu = (props: Props) => {
|
|||
const { messageId, contextMenuId } = props;
|
||||
const isOutgoing = direction === 'outgoing';
|
||||
const showRetry = status === 'error' && isOutgoing;
|
||||
const isSent = status === 'sent';
|
||||
const isSent = status === 'sent' || status === 'read'; // a read message should be replyable
|
||||
const multipleAttachments = attachments && attachments.length > 1;
|
||||
|
||||
const onContextMenuShown = useCallback(() => {
|
||||
|
|
|
@ -27,6 +27,20 @@ async function onReadReceipt(receipt: { source: string; timestamp: number; readA
|
|||
window.log.info('No message for read receipt', receipt.source, receipt.timestamp);
|
||||
return;
|
||||
}
|
||||
const convoId = message.get('conversationId'); // this might be a group and we don't want to handle them
|
||||
if (
|
||||
!convoId ||
|
||||
!getConversationController().get(convoId) ||
|
||||
!getConversationController()
|
||||
.get(convoId)
|
||||
.isPrivate()
|
||||
) {
|
||||
window.log.info(
|
||||
'Convo is undefined or not a private chat for read receipt in convo',
|
||||
convoId
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const readBy = message.get('read_by') || [];
|
||||
const expirationStartTimestamp = message.get('expirationStartTimestamp');
|
||||
|
|
Loading…
Reference in New Issue