Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check canLeaveConversation and canDeleteConversation handling #1932

Open
nickvergessen opened this issue Jan 2, 2025 · 0 comments · May be fixed by #1933
Open

Check canLeaveConversation and canDeleteConversation handling #1932

nickvergessen opened this issue Jan 2, 2025 · 0 comments · May be fixed by #1933

Comments

@nickvergessen
Copy link
Member

nickvergessen commented Jan 2, 2025

Check the logic in

if self.type != .oneToOne && self.type != .formerOneToOne && self.participants.count > 1 {

If the attribute canLeaveConversation is there it should be respected no matter any other things. Same for canDeleteConversation. (Required for an upcoming feature where we change those values e.g. one-to-one can no longer be left, but only deleted: nextcloud/spreed#14064 )

Additionally afterwards the logic seems inverted. the last moderator can only leave when they are the only participant. Currently it seems to return true when there are more than 1 users
its also true always for moderators, but the last moderator will have a failure, but that might be handled.

Also make sure that canDeleteConversation is used to determine if "Delete all message" is shown.

@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💬 Talk team Jan 2, 2025
@nickvergessen nickvergessen moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 💬 Talk team Jan 2, 2025
@SystemKeeper SystemKeeper linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📄 To do (~10 entries)
Development

Successfully merging a pull request may close this issue.

1 participant