Skip to content

Commit

Permalink
fix: enable frozen channel message actions behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Jul 19, 2024
1 parent 6cd283b commit 64f3df4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package/src/components/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ const MessageWithContext = <
};

const onLongPressMessage =
disabled || hasAttachmentActions || isBlockedMessage(message)
hasAttachmentActions || isBlockedMessage(message)
? () => null
: onLongPressMessageProp
? (payload?: TouchableHandlerPayload) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ const MessageContentWithContext = <
additionalTouchableProps,
alignment,
Attachment,
disabled,
FileAttachmentGroup,
Gallery,
groupStyles,
Expand Down Expand Up @@ -272,7 +271,7 @@ const MessageContentWithContext = <
return (
<TouchableOpacity
activeOpacity={0.7}
disabled={disabled || preventPress}
disabled={preventPress}
onLongPress={(event) => {
if (onLongPress) {
onLongPress({
Expand Down
10 changes: 3 additions & 7 deletions package/src/components/MessageInput/MessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,7 @@ const MessageInputWithContext = <
) : (
<View style={[styles.sendButtonContainer, sendButtonContainer]}>
<SendButton
disabled={
disabled ||
sending.current ||
!isValidMessage() ||
(giphyActive && !isOnline)
}
disabled={sending.current || !isValidMessage() || (giphyActive && !isOnline)}
/>
</View>
))}
Expand Down Expand Up @@ -1071,7 +1066,8 @@ export const MessageInput = <

const { t } = useTranslationContext();

if ((disabled || !ownCapabilities.sendMessage) && SendMessageDisallowedIndicator) {
// If the channel is frozen and the input is not in editing state.
if (!editing && !ownCapabilities.sendMessage && SendMessageDisallowedIndicator) {
return <SendMessageDisallowedIndicator />;
}

Expand Down

0 comments on commit 64f3df4

Please sign in to comment.