mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Make group creation exceptions more accurate.
This commit is contained in:
parent
d8e1df9233
commit
fe03a22926
@ -357,12 +357,13 @@ public class GroupCreateActivity extends PassphraseRequiredSherlockFragmentActiv
|
||||
private long handleCreatePushGroup(String groupName,
|
||||
byte[] avatar,
|
||||
Set<Recipient> members)
|
||||
throws IOException, InvalidNumberException
|
||||
throws InvalidNumberException, MmsException
|
||||
{
|
||||
try {
|
||||
GroupDatabase groupDatabase = DatabaseFactory.getGroupDatabase(this);
|
||||
List<String> memberE164Numbers = getE164Numbers(members);
|
||||
byte[] groupId = groupDatabase.allocateGroupId();
|
||||
|
||||
try {
|
||||
List<String> memberE164Numbers = getE164Numbers(members);
|
||||
String groupRecipientId = GroupUtil.getEncodedId(groupId);
|
||||
|
||||
String groupActionArguments = GroupUtil.serializeArguments(groupId, groupName, memberE164Numbers);
|
||||
@ -377,9 +378,11 @@ public class GroupCreateActivity extends PassphraseRequiredSherlockFragmentActiv
|
||||
GroupContext.Type.CREATE_VALUE,
|
||||
groupActionArguments, avatar);
|
||||
} catch (RecipientFormattingException e) {
|
||||
throw new IOException(e);
|
||||
throw new AssertionError(e);
|
||||
} catch (MmsException e) {
|
||||
throw new IOException(e);
|
||||
Log.w("GroupCreateActivity", e);
|
||||
groupDatabase.remove(groupId, TextSecurePreferences.getLocalNumber(this));
|
||||
throw new MmsException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user