[Chat] Prevent reactions when unavailable (#10615)

This commit is contained in:
Samuel Newman
2026-05-26 19:55:30 +03:00
committed by GitHub
parent 308b2e05f1
commit 1113686e30
5 changed files with 125 additions and 33 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
import {View} from 'react-native'
import {type ChatBskyConvoDefs} from '@atproto/api'
import {type ChatBskyConvoDefs, type ModerationOpts} from '@atproto/api'
import {useLingui} from '@lingui/react/macro'
import {atoms as a} from '#/alf'
@@ -10,18 +10,23 @@ export function ActionsWrapper({
message,
isFromSelf,
senderProfile,
moderationOpts,
children,
}: {
message: ChatBskyConvoDefs.MessageView
hasReactions?: boolean
isFromSelf: boolean
senderProfile?: bsky.profile.AnyProfileView
moderationOpts: ModerationOpts | undefined
children: React.ReactNode
}) {
const {t: l} = useLingui()
return (
<MessageContextMenu message={message} senderProfile={senderProfile}>
<MessageContextMenu
message={message}
senderProfile={senderProfile}
moderationOpts={moderationOpts}>
{trigger =>
// will always be true, since this file is platform split
trigger.IS_NATIVE && (