We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

CurrentUser not being recognized

The default templates of Incoming and Outgoing messages are not working in my version.

When downloading your example from github, it works.

When I copy and paste your code to my project ( copying 100% the same), it's like the "CurrentUser" is not being reconized and also the Avatar property (images never appear). So, what happens is that all the Messages appear like incoming messages.

I am using SfChat 20.3.0.48 , but also tried with the 20.3.0.49 and Xamarin.Forms 5.0.0.2196 and it's not working.




1 Reply

SV Suja Venkatesan Syncfusion Team October 13, 2022 01:04 PM UTC

Hi Marcelo,


We would like to you know that the SfChat.CurrentUser helps differentiate between the sender and receiver of the messages. We suspect you are missed to set SfChat.CurrentUser property in your application which may cause the reported problem. Please set the CurrentUser property as like below code snippet.

Code Snippet:

<sfChat:SfChat x:Name="sfChat"

                           AllowMultilineInput="True"

                           ShowTypingIndicator="False"

                           Messages="{Binding Messages}"

                           CurrentUser="{Binding CurrentUser}">

            </sfChat:SfChat>


We have also attached a runnable sample for your reference. Please refer our user guidelines documentation regarding setting conversation.

UG link: https://help.syncfusion.com/xamarin/chat/messages?cs-save-lang=1&cs-lang=csharp#setting-current-user-for-conversation


Please let us know if you need any further assistance.


Regards,

Suja



Attachment: SfChat_d71158a0.zip

Loader.
Live Chat Icon For mobile
Up arrow icon