Signal-iOS icon indicating copy to clipboard operation
Signal-iOS copied to clipboard

Unable to delete group with 0 members

Open hubosaurusrex opened this issue 10 years ago • 8 comments

  • [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

hubosaurusrex avatar Nov 10 '16 16:11 hubosaurusrex

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.

michaelkirk avatar Nov 10 '16 17:11 michaelkirk

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?

naomihimley avatar Nov 14 '16 22:11 naomihimley

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])

guillett avatar Nov 15 '16 12:11 guillett

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:

  1. Leave the group.
  2. 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:

  1. If I’m a member of the group, leave the group.
  2. Delete the group thread.

michaelkirk avatar Nov 15 '16 13:11 michaelkirk

The code is naive because it assumes you hadn’t already left the group. So the correct behavior when deleting group threads should be:

  1. If I’m a member of the group, leave the group.
  2. Delete the group thread.

Oh. @guillett's already got this at https://github.com/WhisperSystems/Signal-iOS/pull/1465/files =)

michaelkirk avatar Nov 15 '16 13:11 michaelkirk

Yes, that's why I shared my thoughts here :-)

guillett avatar Nov 15 '16 13:11 guillett

Edit: Oops... misunderstood

2-4601 avatar Nov 15 '16 16:11 2-4601

Thanks @michaelkirk for the merge. It should be possible to close that issue now.

guillett avatar Nov 17 '16 19:11 guillett