[typo] Jabber notification: possible fix for my issue

Trejkaz trejkaz at trypticon.org
Mon Jan 9 18:41:26 EST 2006

Aha.  Okay, I have some progress:

    trejkaz at morden> script/console
    Loading development environment.
    >> Jabber::JID.new("typo at trypticon.org/typo")
    => #<Jabber::JID:0xb764d22c @resource="typo", @host="trypticon.org",
    >> me = User.find_all[0]
    => [snip]
    >> JabberNotify.send_message(me, "test", "Test body", "")
    ** Sending Test body to trejkaz at trypticon.org via jabber.
    => nil
    >> Jabber::JID.new("typo at trypticon.org/typo")
    => #<Jabber::JID:0xb764d22c @resource="typo", @domain="trypticon.org",
    >> ^D

The code inside Jabber4R's Jabber::Session is expecting to call
"jid.host", and looking at this console log it might be a bit mystifying
because it looks like the wrong class is being created the second time. 
And that's exactly what's happening. :-)

Typo includes Jabber4R, which has JID#host.
In my main Ruby libraries I have installed XMPP4R (slightly newer), which
has JID#domain.

So at some point, Rails is using voodoo to auto-require XMPP4R even though
Jabber::JID is already loaded from Jabber4R.

Is there any easy way to bypass this sort of thing that doesn't involve me
uninstalling XMPP4R?  I suppose I could always modify Typo to use the
newer library and then submit the diff...


More information about the Typo-list mailing list