Fix issue where we weren't calling setTransactionSuccessful().
In a chain of events, this manifested by preventing the persistence of media messages in group threads.
This commit is contained in:
parent
01b9cb13b4
commit
e0657d09d8
1 changed files with 3 additions and 1 deletions
|
@ -616,12 +616,14 @@ public class RecipientDatabase extends Database {
|
|||
Optional<RecipientId> existing = getByColumn(GROUP_ID, groupId.toString());
|
||||
|
||||
if (existing.isPresent()) {
|
||||
db.setTransactionSuccessful();
|
||||
return existing.get();
|
||||
}
|
||||
|
||||
if (groupId.isV1()) {
|
||||
Optional<RecipientId> v2 = getByGroupId(groupId.requireV1().deriveV2MigrationGroupId());
|
||||
if (v2.isPresent()) {
|
||||
db.setTransactionSuccessful();
|
||||
return v2.get();
|
||||
}
|
||||
}
|
||||
|
@ -629,6 +631,7 @@ public class RecipientDatabase extends Database {
|
|||
if (groupId.isV2()) {
|
||||
Optional<GroupDatabase.GroupRecord> v1 = DatabaseFactory.getGroupDatabase(context).getGroupV1ByExpectedV2(groupId.requireV2());
|
||||
if (v1.isPresent()) {
|
||||
db.setTransactionSuccessful();
|
||||
return v1.get().getRecipientId();
|
||||
}
|
||||
}
|
||||
|
@ -636,7 +639,6 @@ public class RecipientDatabase extends Database {
|
|||
RecipientId id = getOrInsertFromGroupId(groupId);
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
|
||||
return id;
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
|
Loading…
Add table
Reference in a new issue