Skip to content

[🔥] Copy Message action handler copies the original message, not the translated one #3324

@frankcalise

Description

@frankcalise

Issue

When using the Copy Message action handler from the long press gesture, it works fine if both users are chatting in the same language. However, if one user has a different language, although it appears native to the receiving user, when they go to copy that text, it pulls the original untranslated message.

Steps to reproduce

Steps to reproduce the behavior:

  1. Send a message on a device with non-English locale
  2. On the English device, observe the message comes through translated into English
  3. On the English device, long press the message bubble and select Copy Message
  4. Paste the message back into the chat input box
  5. Observe the message is in the original locale

Expected behavior

I'd expect the message to be translated if it is possible and then fallback to the original if it fails.

Project Related Information

Customization

Click To Expand

  • MessageInput
  • MessageList
            <MessageList
              onThreadSelect={(thread) => {
                if (!thread) return
                router.push({
                  pathname: "/chat/[cid]/thread/[tid]",
                  params: { cid: channel.cid, tid: thread.id },
                })
              }}
            />
            <MessageInput
              additionalTextInputProps={{ selectionColor: colors.palette.blue1 }}
              InputButtons={InputButtons}
            />

Offline support

  • I have enabled offline support.
  • The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)

Environment

Click To Expand

package.json:

    "stream-chat": "^9.20.0",
    "stream-chat-expo": "^8.5.1",
    "stream-chat-react": "^13.7.0"

react-native info output:

This command fails in an Expo project

Expo SDK 53
React Native 0.79.6
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • stream-chat-expo version you're using that has this issue:
    • 8.8.1
  • Device/Emulator info:
    • I am using a physical device
    • OS version: iOS 18.2
    • Device/Emulator: iPhone 16

Additional context

Screenshots

Click To Expand


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions