mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
update group type for old version
This commit is contained in:
parent
d9a7dc07ef
commit
1b6828888f
1 changed files with 20 additions and 0 deletions
|
@ -1569,6 +1569,16 @@ static NSTimeInterval launchStartedAt;
|
|||
}];
|
||||
[NSUserDefaults.standardUserDefaults setBool:YES forKey:userDefaultsKey];
|
||||
}
|
||||
else {
|
||||
[OWSPrimaryStorage.dbReadWriteConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
TSGroupThread *thread = [TSGroupThread threadWithGroupId:chat.idAsData transaction:transaction];
|
||||
if (!thread.groupModel.groupType) {
|
||||
thread.groupModel.groupType = PUBLIC_CHAT;
|
||||
[thread saveWithTransaction:transaction];
|
||||
}
|
||||
// OWSLogInfo(@"GROUP MODEL TYPE %d", thread.groupModel.groupType);
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1588,6 +1598,16 @@ static NSTimeInterval launchStartedAt;
|
|||
[OWSProfileManager.sharedManager addThreadToProfileWhitelist:thread];
|
||||
[NSUserDefaults.standardUserDefaults setBool:YES forKey:userDefaultsKey];
|
||||
}
|
||||
else {
|
||||
[OWSPrimaryStorage.dbReadWriteConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
TSGroupThread *thread = [TSGroupThread threadWithGroupId: [feed.id dataUsingEncoding:NSUTF8StringEncoding] transaction:transaction];
|
||||
if (!thread.groupModel.groupType) {
|
||||
thread.groupModel.groupType = RSS_FEED;
|
||||
[thread saveWithTransaction:transaction];
|
||||
}
|
||||
// OWSLogInfo(@"GROUP MODEL TYPE %d", thread.groupModel.groupType);
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue