[Psi-devel] URI handler for the n-th time

Magnus Henoch mange at freemail.hu
Thu Nov 16 04:57:14 PST 2006


Maciek Niedzielski <machekku at uaznia.net>
writes:

> +		qWarning("uri auth: [" + uri.authority() + "]");
> +
> +		Jid authJid = JIDUtil::fromString(uri.authority());
> +		foreach(PsiAccount* acc, d->contactList->enabledAccounts()) {
> +			if (acc->jid().compare(authJid, false)) {
> +				pa = acc;
> +			}
> +		}
> +
> +		if (!pa) {
> +			foreach(PsiAccount* acc, d->contactList->accounts()) {
> +				if (acc->jid().compare(authJid, false)) {
> +					QMessageBox::warning(0, tr("Warning"), QString("The account for %1 JID is disabled right now.").arg(authJid.bare()));
> +					return;	// FIX-ME: Should suggest enabling it now
> +				}
> +			}
> +		}
> +		if (!pa) {
> +			QMessageBox::warning(0, tr("Warning"), QString("You don't have an account for %1.").arg(authJid.bare()));
> +			return;
> +		}

One use I have imagined for XMPP URIs is using them on an account
registration web page.  That is, after creating an account, you would
just click the xmpp://newaccount@example.com link, and your client
would start using this account.

-- 
Magnus
JID: legoscia at jabber.cd.chalmers.se



More information about the psi-devel mailing list