Hi,
I use “sendbird-uikit”: “1.1.3” and I am trying to add custom CSS to a message with a specific type (using a custom type), i cant find a way to use renderChatItem in the Channel component without self implement all the whole thing…
I want to make sure that I properly understand what you’re talking about. You want to add additional CSS to the ChatItem component within the Channel component?
I do… I want to add style for some messages that have CUSTOM_TYPE = ‘some_type’ and all the other functionality should be the same…
P.S there is no class that represents the CUSTOM_TYPE attribute
I use the sendUserMessage from the SDK and I can see the CUSTOM_TYPE in the onMessageReceived event
the chat item is one use case but yah…
first of all, it works so thanks for the help!
my use case is creating 1 on 1 session both with chat and video (the sendbird-calls api) in one app
the reason i need the custom message is for video events like call ended and statuses like that…
i know you have this feature
but it didnt work for me plus i want to be able to control it
so for now only thing to figure out is y sendUserMessage doesn’t add message to the user that sends it
@Dror_Elgabsi Could you expand on what you mean by the sendUserMessage doesn’t add message to the user that sends it? Are you saying that when a user sends a message, you don’t see it show on that users feed? I assume if you refresh, it does show up?
What version of the UIKit are you using? I implemented your code as outlined here and I did not have any issues getting the sending user’s chat to update.
this is the version “sendbird-uikit”: “1.3.2” as recommended in this thread.
the issue is when i use channelInfo.sendUserMessage(message, extraData, type, callback);
to add the call messages not when i use the ui to send messages, when i use the ui it works
here is a short video
when i hangup the call the sendUserMessage is called in the onEnd event
Okay, I understand now. I must have overlooked that you are using a mixture of the UIKit and the Core SDK. Let me see if I can reproduce now that I have a better understand. I’ll let you know what I find.
Could you show me your code for the onEnd event? I’m still not able to recreate this and I want to make sure I’m matching up our behavior as closely as possible.
I am testing on 1.3.2 so I can ensure we’re testing on the same version. I was able to reproduce the behavior utilizing the SDK method to send message.
As for why the message does not update, nothing is calling for the view to update. When we send a message via the input, it updates the state which causes the view to update. When the SDK sends the message, nothing updates the state, and thus the view is not updated.
You could utilize the Platform API to send the call status, which would does cause the state to update for all parties in the chatroom.
Thanks, Tyler for your help. i manage to fix it using this: const sendMessage = sendBirdSelectors.getSendUserMessage(state);
instead of channelInfo.sendUserMessage(message, extraData, type, callback);