Enable V2 closed group control messages

This commit is contained in:
Niels Andriesse 2021-02-09 13:55:32 +11:00
parent 0cbdc8be96
commit e7b9017992
3 changed files with 4 additions and 4 deletions

View File

@ -271,9 +271,9 @@ final class EditClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelega
Storage.write(with: { [weak self] transaction in
do {
if !members.contains(getUserHexEncodedPublicKey()) {
try MessageSender.leave(groupPublicKey, using: transaction)
try MessageSender.v2_leave(groupPublicKey, using: transaction)
} else {
try MessageSender.update(groupPublicKey, with: members, name: name, transaction: transaction)
try MessageSender.v2_update(groupPublicKey, with: members, name: name, transaction: transaction)
}
} catch {
DispatchQueue.main.async {

View File

@ -939,7 +939,7 @@ static CGRect oldframe;
if (gThread.isClosedGroup) {
NSString *groupPublicKey = [LKGroupUtilities getDecodedGroupID:gThread.groupModel.groupId];
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[SNMessageSender leaveClosedGroupWithPublicKey:groupPublicKey using:transaction error:nil];
[SNMessageSender v2_leaveClosedGroupWithPublicKey:groupPublicKey using:transaction error:nil];
}];
}

View File

@ -398,7 +398,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, UIViewC
let groupID = thread.groupModel.groupId
let groupPublicKey = LKGroupUtilities.getDecodedGroupID(groupID)
do {
try MessageSender.leave(groupPublicKey, using: transaction)
try MessageSender.v2_leave(groupPublicKey, using: transaction)
} catch {
// TODO: Handle
}