mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-12 11:08:03 +00:00
Merge pull request #215 from bitstadium/feature/fix-setuserid
Fix bug where setUserID never works
This commit is contained in:
@@ -583,9 +583,7 @@ static void uncaught_cxx_exception_handler(const BITCrashUncaughtCXXExceptionInf
|
||||
* @return The userID value
|
||||
*/
|
||||
- (NSString *)userIDForCrashReport {
|
||||
// first check the global keychain storage
|
||||
NSString *userID = [self stringValueFromKeychainForKey:kBITHockeyMetaUserID] ?: @"";
|
||||
|
||||
NSString *userID;
|
||||
#if HOCKEYSDK_FEATURE_AUTHENTICATOR
|
||||
// if we have an identification from BITAuthenticator, use this as a default.
|
||||
if ((
|
||||
@@ -597,13 +595,19 @@ static void uncaught_cxx_exception_handler(const BITCrashUncaughtCXXExceptionInf
|
||||
}
|
||||
#endif
|
||||
|
||||
// first check the global keychain storage
|
||||
NSString *userIdFromKeychain = [self stringValueFromKeychainForKey:kBITHockeyMetaUserID];
|
||||
if (userIdFromKeychain) {
|
||||
userID = userIdFromKeychain;
|
||||
}
|
||||
|
||||
if ([[BITHockeyManager sharedHockeyManager].delegate respondsToSelector:@selector(userIDForHockeyManager:componentManager:)]) {
|
||||
userID = [[BITHockeyManager sharedHockeyManager].delegate
|
||||
userIDForHockeyManager:[BITHockeyManager sharedHockeyManager]
|
||||
componentManager:self] ?: @"";
|
||||
componentManager:self];
|
||||
}
|
||||
|
||||
return userID;
|
||||
return userID ?: @"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user