111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
{
XMPPContact *contact;
OFString *bareJID = [[rosterItem JID] bareJID];
contact = [_contacts objectForKey: bareJID];
if ([[rosterItem subscription] isEqual: @"remove"]) {
[_contacts removeObjectForKey: bareJID];
if (contact != nil)
[_delegates broadcastSelector: @selector(contactManager:
didRemoveContact:)
withObject: self
withObject: contact];
return;
}
if (contact == nil) {
contact = [[XMPPContact new] autorelease];
[contact XMPP_setRosterItem: rosterItem];
[_contacts setObject: contact
|
<
>
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
{
XMPPContact *contact;
OFString *bareJID = [[rosterItem JID] bareJID];
contact = [_contacts objectForKey: bareJID];
if ([[rosterItem subscription] isEqual: @"remove"]) {
if (contact != nil)
[_delegates broadcastSelector: @selector(contactManager:
didRemoveContact:)
withObject: self
withObject: contact];
[_contacts removeObjectForKey: bareJID];
return;
}
if (contact == nil) {
contact = [[XMPPContact new] autorelease];
[contact XMPP_setRosterItem: rosterItem];
[_contacts setObject: contact
|