Dynamic channel membership (Backend side operation for users)

We have a workplace app where workers “check-in” and “check-out” during the work day. we want to add chat feature but some of them include the ability to send messages only to “checked-in” workers.
As far as I can see from the API a channel membership feels like something pretty stable and not really “dynamic” by nature.
My original thought was to have a BE cloud function add/remove users from the relevant channels according to the “checked-in” state change.

Is that possible ? is this the approach you would recommend ?

If not, maybe a different approach would be to update the users “DnD” status in Sendbird the same way a client will call “SendbirdChat.setDoNotDisturb” or mute the specfic channels for the users (from the BE)

The thing when I review the Platform SDK it doesn’t seem to fit this bill too much, I don’t see simple way to do this from the BE.
This means the clients side application will to hold all the logic to either “mute” channels or leave/join groups … This will be a huge disadvantage for us.

I would love of someone can shed some light on the whole philosophy here and recommend the a “good practice” where we don’t need to rely on client side oprerations.

Any one ? I really need some help with this

Hello Shai,

In terms of best practices, it really depends on your specific requirements and constraints. If you want to minimize client-side logic and maintain a strict separation between checked-in and checked-out users, the channel membership management approach might be best as described below.

You can add or remove users from channels based on their “checked-in” status using our platform APIs.
This would indeed require a backend service that listens for check-in and check-out events and update the channel memberships accordingly. Please note, it could lead to a high volume of join/leave operations if your workers frequently check in and out.