[Sugar-devel] sugar.profile.jabber_registered and sugar.profile.is_registered() are deprecated?
morgan.collett at gmail.com
Wed Feb 11 04:46:05 EST 2009
On Wed, Feb 11, 2009 at 09:07, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> Working with sucrose-0.82, I was surprised to discover that
> - there is no codepath that will set jabber_registered to true
> - the only reliable thing to use is profile.jabber_server
> - profile.is_registered() not consistent with either...
> I guess sugar devs already know this, Simon has removed all this cruft.
Yes, way back we found that tracking is_registered was unreliable,
especially when we had to reload the server or prune the registered
users. After telling the nth person to edit the config file to set it
back to unregistered, we simply made the Presence Service reregister
automatically if it got an authentication failure, and ignored the
setting. At the time, the "Register" menu option seemed to be magic,
and nobody could say what it was supposed to do. (I think this was
before there were regular XS releases.)
> What is the new way of asking whether the XO is registered? Is there a
> reasonable idiom that will work on 0.82 and current 'master'?
Ask the server?
Older releases required a non-empty (but not necessarily valid) jabber
server (e.g. ship2.jabber.laptop.org) to be populated. 0.82 shipped
with an empty jabber server by default. 0.84 has
"jabber.sugarlabs.org" as the jabber server by default, now that we
have gadget to prevent overloading that server.
Any values besides these would show that the user (or the Register
function) had changed the jabber server, but not whether registration
on the populated server was successful. (And the presence of
jabber.sugarlabs.org says nothing about whether the user registered on
that server either.)
Looks like 0.86 needs a new feature around registration management as
we're significantly after the 0.84 feature freeze.
More information about the Sugar-devel