robbiehanson/XMPPFramework — Issue #14: XMPPUserMemoryStorage:updateWithItem  incorrect ? 
Author: forcewill
Created: 2012-02-02 19:01:25+00:00
State: open

XMPPUserMemorySorage:updateWithItem implementation is:

- (void)updateWithItem:(NSXMLElement *)item
{
for (NSXMLNode *node in [item attributes])
{
NSString *key = [node name];
NSString *value = [node stringValue];

[itemAttributes setObject:value forKey:key];
}
}

Should we not remove all keys from ittemAttributes before updating ?

Im noticing the following flow

users A and B

A (myself) subscribe user B and B accepts

ittemAttributes :
ask = 'subscribe'
subscription = 'none'

after B accepts

ask = 'subscribe'
subscription = 'to'

this is incorrect

Either the error is in updateWithItem or in updateWithPresence:(XMPPPresence *)presence