Allow reactions/replies after setting removalStage
This commit is contained in:
parent
b089eef942
commit
9eea26c5d6
4 changed files with 21 additions and 2 deletions
|
@ -781,7 +781,7 @@ export function CompositionArea({
|
|||
// If no message request, but we haven't shared profile yet, we show profile-sharing UI
|
||||
if (
|
||||
!left &&
|
||||
((conversationType === 'direct' && removalStage !== 'justNotification') ||
|
||||
(conversationType === 'direct' ||
|
||||
(conversationType === 'group' && groupVersion === 1)) &&
|
||||
isMissingMandatoryProfileSharing
|
||||
) {
|
||||
|
|
|
@ -55,6 +55,21 @@ export async function enqueueReactionForSend({
|
|||
);
|
||||
|
||||
const isMessageAStory = isStory(message.attributes);
|
||||
|
||||
if (
|
||||
!isMessageAStory ||
|
||||
isDirectConversation(messageConversation.attributes)
|
||||
) {
|
||||
log.info('Enabling profile sharing for reaction send');
|
||||
if (!messageConversation.get('profileSharing')) {
|
||||
messageConversation.set('profileSharing', true);
|
||||
await window.Signal.Data.updateConversation(
|
||||
messageConversation.attributes
|
||||
);
|
||||
}
|
||||
await messageConversation.restoreContact();
|
||||
}
|
||||
|
||||
const targetConversation =
|
||||
isMessageAStory && isDirectConversation(messageConversation.attributes)
|
||||
? window.ConversationController.get(targetAuthorAci)
|
||||
|
|
|
@ -1049,6 +1049,7 @@ export function isMissingRequiredProfileSharing(
|
|||
const doesConversationRequireIt =
|
||||
!conversation.isMe &&
|
||||
!conversation.left &&
|
||||
!conversation.removalStage &&
|
||||
(isGroupV1(conversation) || isDirectConversation(conversation));
|
||||
|
||||
return Boolean(
|
||||
|
|
|
@ -1766,7 +1766,10 @@ function canReplyOrReact(
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!conversation.acceptedMessageRequest) {
|
||||
if (
|
||||
!conversation.acceptedMessageRequest &&
|
||||
conversation.removalStage !== 'justNotification'
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue