[sip-comm-dev] account address for jabber account id

Sympho symphorien.wanko-tchuente at ulp.u-strasbg.fr
Mon Sep 17 13:14:11 CEST 2007


Sympho a écrit :
> Hi,
>
> I have made a smal modification on JabberAccountID.java, adding the 
> method
>    public String getAccountAddress()
> to overrides the super one's which returns
>    user at example.com@example.com
> as the user address for a jabber account. A jabber acount already 
> consist of the user address.
> So, adding the server name at the end of the account id caused to have 
> it twice in the resulting user address.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help at sip-communicator.dev.java.net
>
hem... well,

I haven't read anywhere that a jabber user id must always consist of an 
address so,
it is possible that the previous assertion isn't 100% accurate. To 
resolve the problem,
What do you think of replacing the actual AccountID#getAccountAddress

        public String getAccountAddress()
        {
            return getUserID() + "@" + getService();
        }

by

        public String getAccountAddress()
        {
            if (getUserID().indexOf('@') > 0)
                return getUserID();
           else
                return getUserID() + "@" + getService();
        }

or another option is to remove the service name at the end of a jabber 
user id
as it is done in the SipAccountID constructor.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: dev-help at sip-communicator.dev.java.net





More information about the dev mailing list