Handling user leaving 1-1 distinct conversations

Currently, our application manages two different kinds of conversations:

  • 1 on 1 direct messaging (Group Chat)
  • Multiple participant messaging (Group Chat)

Handling a user leaving a multiple participant chat is easy, but in the 1-1 we want to take an Instagram inspired approach where the following happens:

Flow we want:

  • User A and B are in a 1-1 chat.
  • User A leaves chat leaving only B in 1-1 chat.
  • User B can still see the chat and all the messages even though user A has technically left.
  • User A can not see the chat anymore since they have technically left.
  • User B can send a message to the chat that will then bring the chat back up to user A.
  • User A will no longer have message history but will now see the chat again.

The Issue:
Our issue currently, is that when user A leaves in our app, user B no longer has any info on the user they were 1-1 chatting with. We can’t render their name as the channel name or show their profile picture because they have completely left. This also means that if user B sends a message, no one will receive it because user A is completely gone.

Imperfect Solution:
There is a solution currently in Sendbird, but it isn’t perfect. We could have user A hide the channel instead of leaving it completely. That way, user B still has user A’s info to render the channel correctly and can send messages like normal that will unhide the channel for user A. However, we have concerns about hitting the 2000 channel limit this way. If user A hides a lot of channels then it stands to reason they could build up over time and hit their limit without a good way to remove them. What would be a good way to handle the flow we’re wanting?