`SBUBaseChannelViewController` bug when calling `loadChannel(channelUrl:messageListParams:)`

When SBUBaseChannelViewController is initialized with a certain channel ID and then loads a different channel by calling loadChannel(channelUrl:messageListParams:), the channelUrl property is not updated.

This results in a bug where the pending message doesn’t get removed.

The code proceeds as follows:

  1. SBUPendingMessageManager.shared.upsertPendingMessage is called with baseChannel.channelUrl
  1. Subsequent calls to SBUPendingMessageManager are called with channelUrl.

I confirmed that the first insert to SBUBaseChannelViewController.pendingMessages is called with the correct channel ID whereas later calls for the pending status and success status are called with the initial channel ID.

Please let me know when this gets fixed.

I was able to confirm that things work as they should when calling viewController.setValue(id, forKey: "channelUrl") in conjunction with loadChannel

Wondering if anyone has looked into this issue… :roll_eyes:

Hi @GoGo7
Sorry for too late checking your problem.
ChannelViewController was not originally designed to change channels internally.
But through the loadChannel function, it should be able to the process you want.
And thanks to your information I found a problem that the logic of not updating the channelURL.
I will fix this problem in the new version. However, the regular distribution schedule is in two weeks.
Can you wait for the distribution?

1 Like

Sounds good. Thank you.


Regarding this issue, iOS released version 2.2.6 yesterday (Mar, 28th)