stream-chat-android
stream-chat-android copied to clipboard
The Android recipient user will be allowed to edit the sender's message.
Describe the bug The Android recipient user will be allowed to edit the sender's message.
So as this is bug can you please remove this option for edit the sender's message. This is also not functioning :)
Check below screenshots for reference purpose.
SDK version
- 5.17.21
To Reproduce Steps to reproduce the behaviour
- Go to message view
- Click on long press to sender's message.
- Scroll down to see the option for edit
Expected behavior this edit option need to hide
Device:
- All Device
- For all version
Screenshots If applicable, add screenshots to help explain your problem.
We are not able to reproduce in our default sample apps (Compose and XML). Are you maybe calling setOwnCapabilities()
anywhere in code and adding ChannelCapabilities.UPDATE_ANY_MESSAGE
?
Hello Daniel,
Thank you for response but we are not use this in our code still same issue we found.
FInd below code we implemented
val factory = MessageListViewModelFactory(channelId)
val messageListHeaderViewModel: MessageListHeaderViewModel by viewModels { factory }
val messageListViewModel: MessageListViewModel by viewModels { factory }
val messageInoutViewModel: MessageInputViewModel by viewModels { factory }
// Set view factory for Imgur attachments
val imgurAttachmentViewFactory = ImgurAttachmentViewFactory()
val attachmentViewFactory = AttachmentFactoryManager(listOf(imgurAttachmentViewFactory))
if (!mBinding.messageListView.isAdapterInitialized())
mBinding.messageListView.setAttachmentFactoryManager(attachmentViewFactory)
// Step 2 - Bind the view and ViewModels, they are loosely coupled so it's easy to customize
messageListHeaderViewModel.bindView(mBinding.messageListHeaderView, this)
messageListViewModel.bindView(mBinding.messageListView, this)
messageInoutViewModel.bindView(mBinding.messageInputView, this)
// // Step 3 - Let both MessageListHeaderView and MessageInputView know when we open a thread
// // Note: the observe syntax used here requires Kotlin 1.4
messageListViewModel.mode.observe(viewLifecycleOwner) { mode ->
when (mode) {
is MessageListViewModel.Mode.Thread -> {
messageListHeaderViewModel.setActiveThread(mode.parentMessage)
messageInoutViewModel.setActiveThread(mode.parentMessage)
}
MessageListViewModel.Mode.Normal -> {
messageListHeaderViewModel.resetThread()
messageInoutViewModel.resetThread()
}
}
}
// Step 5 - Let the message input know when we are editing a message
mBinding.messageListView.setMessageEditHandler(messageInoutViewModel::editMessage)