LastMessage object not updated in current channel

Hi,

We are using sendbird , Group channel for our app with javascript. When user1 messages user2 receiving the message but vice versa not happening. Channel urls are same
On Message received we are checking for currentchannelinfo=channel which is failing and not updating the channel info.
In this case lastmessage object is not updated in currentchannelinfo where as channel is updated.
Please guide us , why lastmessage is not updating

here is the code snippet

ChannelHandler.onMessageReceived = function (channel, message) {
var isCurrentChannel = false;

    if (currChannelInfo == channel) {
        isCurrentChannel = true;
    }

I am also facing same issue. If you have found the solution, please share.

Hi @Deepa_Test & @xorfish,

Just to clarify, the issue is that currentChannelInfo does not equal channel? Or that channel does not contain the last message? Additionally, which version of the Javascript SDK are you utilizing?

currentChannelInfo doesn’t equal to channel, channel has latest lastmessage whereas currentChannelInfo has old lastmessage(which is not latest).We Using sendbird.min.js (SendBird JavaScript SDK v3.0.35)

Where is currentChannelInfo come from? It sounds like you shouldn’t be comparing the whole object and should be comparing the channel.url. Since the updated channel would have updated attributes.

Thanks @Tyler for the help.