fritzy/SleekXMPP — Issue #118: 'subscription' field is not synced properly in roster.item
Author: coffeeowl
Created: 2011-11-27 22:54:00+00:00
State: open

The way roster.item handles 'subscription' field doesn't work well for server components. I use external DB backend for my server component and 'subscription' field saved with value 'none' even when component and client have mutual authorization/subscription. The problem is that roster.item.save picks current values for fields, which is 'none' for 'subscription'. The only way to get right value in a DB is to reload a component, roster.item.load will be invoked, calculating right value for "subscription" this time and then, after receiving presence stanza from a client right value will go into the DB(roster.item.save)
Server components can work for a long periods of time, so the wrong value can stay for a long time as well. Not quite a problem, but maybe this can be improved by recalculating 'subscription' on save.