mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Improve Profiles Debug UI.
This commit is contained in:
parent
db3c0c6312
commit
aa4fea64cf
3 changed files with 18 additions and 1 deletions
|
@ -35,6 +35,11 @@ class DebugUIProfile: DebugUIPage {
|
|||
OWSTableItem(title: "Log User Profiles") {
|
||||
profileManager.logUserProfiles()
|
||||
},
|
||||
OWSTableItem(title: "Log Profile Key") {
|
||||
let localProfileKey = profileManager.localProfileKey()
|
||||
Logger.info("localProfileKey: \(localProfileKey.keyData.hexadecimalString)")
|
||||
profileManager.logUserProfiles()
|
||||
},
|
||||
OWSTableItem(title: "Regenerate Profile/ProfileKey") {
|
||||
profileManager.regenerateLocalProfile()
|
||||
},
|
||||
|
|
|
@ -851,6 +851,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
|
|||
{
|
||||
OWSUserProfile *userProfile = self.localUserProfile;
|
||||
[userProfile clearWithProfileKey:[OWSAES256Key generateRandomKey] dbConnection:self.dbConnection completion:nil];
|
||||
[self.tsAccountManager updateAccountAttributes];
|
||||
}
|
||||
|
||||
- (void)addUserToProfileWhitelist:(NSString *)recipientId
|
||||
|
|
|
@ -741,6 +741,17 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
|
|||
}
|
||||
}
|
||||
|
||||
- (dispatch_queue_t)serialQueue
|
||||
{
|
||||
static dispatch_queue_t _serialQueue;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_serialQueue = dispatch_queue_create("org.signal.websocket", DISPATCH_QUEUE_SERIAL);
|
||||
});
|
||||
|
||||
return _serialQueue;
|
||||
}
|
||||
|
||||
- (void)processWebSocketRequestMessage:(WebSocketProtoWebSocketRequestMessage *)message
|
||||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
@ -756,7 +767,7 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
|
|||
__block OWSBackgroundTask *_Nullable backgroundTask =
|
||||
[OWSBackgroundTask backgroundTaskWithLabelStr:__PRETTY_FUNCTION__];
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
dispatch_async(self.serialQueue, ^{
|
||||
BOOL success = NO;
|
||||
@try {
|
||||
NSData *_Nullable decryptedPayload =
|
||||
|
|
Loading…
Reference in a new issue