XMPP.open() in xmpp4moz and wizard.js in Sameplace

0 views
Skip to first unread message

Brett Zamir

unread,
Mar 17, 2009, 3:10:48 AM3/17/09
to same...@googlegroups.com
Hi,

Would you want to move:

if(sessionOnly)
onSessionActive();

in XMPP._up(), to the beginning of the callback (to avoid the
intermediate processing it doesn't require)?

It looks to me like the changes you made to _up() will not actually be
viable for registration after all, since _up() requires a password (and
it triggers stanza error messages in a generic way--whereas one really
ought to be able to present the text for the stanza error messages in a
way that is specific to registration--e.g., to say for
"service-unavailable" that "Registration is not supported" instead of
stating that the service is unavailable). By the way, if you extract
registration code, I presume you will allow it to be potentially
independent of verifyAccount(), since one might wish to just try
registering, e.g,. to see if the user is indicated as already registered
per example 3 at http://xmpp.org/extensions/xep-0077.html#usecases .

Also, "regChannel" is currently of no use in wizard.js whereas "channel"
listens for a stream error, but the call to registrationFailed() on line
398 in the channel listener in registerAccount provides no argument as
that function needs.

thanks,
Brett

Massimiliano Mirra

unread,
Mar 17, 2009, 12:07:48 PM3/17/09
to same...@googlegroups.com
On Tue, Mar 17, 2009 at 8:10 AM, Brett Zamir <bre...@gmail.com> wrote:
>
> Hi,
>
> Would you want to move:
>
>         if(sessionOnly)
>             onSessionActive();
>
> in XMPP._up(), to the beginning of the callback (to avoid the
> intermediate processing it doesn't require)?

Good catch, will do.

> It looks to me like the changes you made to _up() will not actually be
> viable for registration after all, since _up() requires a password (and

Indeed. I probably got things mixed up when we first discussed this
-- sessionOnly is used to, well, get only a session, without sending
presence or request roster. You still need to authenticate in order
to get a session.

In the wizard I'm using the connector object directly to register.
Using XMPP.open without providing a password might work as well.
Regarding the display connection-time errors, I haven't found
alternatives so far.

> independent of verifyAccount(), since one might wish to just try
> registering, e.g,. to see if the user is indicated as already registered
> per example 3 at http://xmpp.org/extensions/xep-0077.html#usecases .

That won't worker for servers -- there's no "from" field the server
could use to check if you're already registered.

> Also, "regChannel" is currently of no use in wizard.js whereas "channel"
> listens for a stream error, but the call to registrationFailed() on line
> 398 in the channel listener in registerAccount provides no argument as
> that function needs.

I wish those were the only problems with the wizard. :) It badly
needs an overhaul.

-m

Reply all
Reply to author
Forward
0 new messages