The-Commit-Company / raven

Simple, open source team messaging platform
https://www.ravenchat.ai/
GNU Affero General Public License v3.0
317 stars 133 forks source link

feat: show system messages when channel members are changed #1087

Closed nikkothari22 closed 3 weeks ago

nikkothari22 commented 3 weeks ago

CleanShot 2024-10-11 at 19 43 26@2x

zaheer-srushty commented 3 weeks ago

I just wanted to understand the workflow for this use case

Say, an employee A creates a Private Raven channel and adds employee B & C to the channel. Now, when the employee A leaves the organization, we mark the employee as Left in the HRMS & the user_id is disabled. In this case, the Raven Channel Member doctype for that user is still active and hence the switchover of Admin role to employee B never happens.

Can you explain how is this envisioned in Raven for switchover to occur automatically?

nikkothari22 commented 3 weeks ago

@zaheer-srushty Maybe we need to trigger the admin change if a user is disabled (there's a disabled flag in Raven User doctype). Currently, we don't do that, but it makes sense. Will create an issue for this. Should the disabled member be removed from all channels?

zaheer-srushty commented 3 weeks ago

Yes. The disabled member should be removed from all channels & threads... Also, I noticed that we are still able to send messages to a disabled user in a DM...I think the DM channel input should also be disabled...

zaheer-srushty commented 3 weeks ago

@nikkothari22 I think the system messages should be centered similar to the Date separator rather than having it aligned with the channel messages.

nikkothari22 commented 3 weeks ago

That was the initial thought. We tried that, it didn't look good, especially when you have a lot of them.