Skip to content
Snippets Groups Projects
Commit 4c70387b authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

fix: return value for contact name

Return empty string if could not find contact

Change-Id: Ia48a6703ca79f07fa01ee605a9a94d348ed38f02
parent f631742b
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ static inline NSString* bestIDForConversation(const lrc::api::conversation::Info ...@@ -45,6 +45,7 @@ static inline NSString* bestIDForConversation(const lrc::api::conversation::Info
} }
} catch (std::out_of_range& e) { } catch (std::out_of_range& e) {
NSLog(@"bestIDForConversation: getContact - out of range"); NSLog(@"bestIDForConversation: getContact - out of range");
return @"";
} }
} }
...@@ -96,6 +97,7 @@ static inline NSString* bestNameForConversation(const lrc::api::conversation::In ...@@ -96,6 +97,7 @@ static inline NSString* bestNameForConversation(const lrc::api::conversation::In
return @(alias.c_str()); return @(alias.c_str());
} catch (std::out_of_range& e) { } catch (std::out_of_range& e) {
NSLog(@"bestNameForConversation: getContact - out of range"); NSLog(@"bestNameForConversation: getContact - out of range");
return @"";
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment