Skip to content
Browse files

Make sure to use nickname when adding a contact

* Also some typos
  • Loading branch information...
1 parent 9a2c58e commit 9134190a908dc03a76f74eb1de36289b2c926ab5 @benlangfeld committed Jan 16, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 TNStropheRoster.j
View
6 TNStropheRoster.j
@@ -328,11 +328,11 @@
*/
- (void)addContact:(TNStropheJID)aJID withName:(CPString)aName inGroupWithName:(CPString)aGroupName
{
- if ([self containsJID:aJID] == YES)
+ if ([self containsJID:aJID])
return;
if (!aName)
- aName = [aJID node];
+ aName = [aJID node];
if (!aGroupName)
aGroupName = @"General";
@@ -342,6 +342,8 @@
params = [CPDictionary dictionaryWithObjectsAndKeys:uid, @"id"],
contact = [TNStropheContact contactWithConnection:_connection JID:aJID groupName:aGroupName];
+ [contact setNickname:aName];
+
[_connection registerSelector:@selector(_didAddContact:userInfo:) ofObject:self withDict:params userInfo:aJID];
[contact sendRosterSet];

0 comments on commit 9134190

Please sign in to comment.
Something went wrong with that request. Please try again.