Unable to delete group with 0 members
- [x] I have searched open and closed issues for duplicates
Bug description
Unable to delete group with 0 members
Steps to reproduce
- tap New Message icon
- tap New Group icon
- tap + icon to create new unnamed group with 0 members
- tap ... icon for Conversation Settings
- tap Leave Group
- tap Leave on the popup prompt
- return to Inbox
- swipe left on the unnamed New Group with 0 members
- tap Delete
Actual result:
- popup Leaving group appears
- popup Failed to leave group appears with OK button
- New Group remains in inbox (Archive does work)
Expected result:
- popup Leaving group appears
- New Group should be deleted (appears to work as long as at least 1 member of the group remains)
Device info
Device: iPhone 6 Plus iOS version: 10.1.1 Signal version: 2.6.3
Link to debug log
https://gist.github.com/d044e86c0c011c520a5fb37dd6323b29
As well as what you've pointed out, I think the bigger issue is that we shouldn't allow creating a group with just one person.
If you want to block users from creating a group with 0 or 1 members do you have copy for what you'd like an alert to read?
I don't think we should prevent users from creating 1-member groups as that's a valid state during the 'lifetime' of a group (The only member of a one-member group can add other members).
The bug described here hides a bigger bug which is the emission of a message to group members even if the local user has already left the group.
Steps
- The user left the group from the group conversation view (so that he/she can still read the mesages):
- Members received a 'leave' notification.
- The user attempt to delete the group conversation from the conversation list:
- If there is no other member in the group
- We have the behavior described here (bug)
- If there are remaining members in the group
- They receive a second 'leave' notification for the same user (hidden bug [plus privacy issue - other members now know that the user kept the conversation locally and just deleted it])
- If there is no other member in the group
On Nov 15, 2016, at 7:57 AM, guillett [email protected] wrote:
I don't think we should prevent users from creating 1-member groups as that's a valid state during the 'lifetime' of a group (The only member of a one-member group can add other members).
The bug described here hides a bigger bug which is the emission of a message to group members even if the local user has already left the group.
Steps
The user left the group from the group conversation view (so that he/she can still read the mesages): Members received a 'leave' notification. The user attempt to delete the group conversation from the conversation list: If there is no other member in the group We have the behavior described here (bug) If there are remaining members in the group They receive a second 'leave' notification for the same user (hidden bug [plus privacy issue - other members now know that the user kept the conversation locally and just deleted it]) Right, when you delete a group thread there is some naive code:
- Leave the group.
- Delete the thread.
The code is naive because it assumes you hadn’t already left the group. So the correct behavior when deleting group threads should be:
- If I’m a member of the group, leave the group.
- Delete the group thread.
The code is naive because it assumes you hadn’t already left the group. So the correct behavior when deleting group threads should be:
- If I’m a member of the group, leave the group.
- Delete the group thread.
Oh. @guillett's already got this at https://github.com/WhisperSystems/Signal-iOS/pull/1465/files =)
Yes, that's why I shared my thoughts here :-)
Edit: Oops... misunderstood
Thanks @michaelkirk for the merge. It should be possible to close that issue now.