For the quickest reply, please use our new Customer Helpdesk and Feedback platform
 
   
 
exmpp: presence subscription from a component bot
Posted: 21 March 2010 06:57 PM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2010-03-21

Hi All,

Thanks a lot for developing exmpp library in open source!

I was giving it a first try by following the tutorial at http://www.process-one.net/en/blogs/article/scalable_xmpp_bots_with_erlang_and_exmpp_part_iii and running the article source code. Sweet!

I’ve experienced only one problem so far and I’d like to ask for your help… Sorry, I still haven’t figure out what I’m overlooking here.

Right after a successful registration, the web_status_component sends a request to subscribe the user’s presence informations:

<nick >Web Presence Bot</nick></presence>

or

{xmlel,‘jabber:component:accept’,[],presence,
                [{xmlattr,undefined,type,<<“subscribe”>>},
                {xmlattr,undefined,from,<<“buddy@example.tld”>>},
                {xmlattr,undefined,to,<<“romeo@example.tld”>>}],
                [{xmlel,‘http://jabber.org/protocol/nick’,[],nick,[],
                      [{xmlcdata,<<“Web Presence Bot”>>}]}]}


The server replies back with, stopping the client from exchanging any presence message with the component:

<nick >Web Presence Bot</nick><error code=“400” type=“modify”><bad-request ></error></presence>


Similarly, at component startup presence notifications don’t go through.

Can you please help me in fixing presence subscription handling from a component?

I’m using ejabberd 2.1.x branch with exmpp 0.9.3 and I’d love starting to build a component bot with exmpp :-)

Many thanks!

Best,
Vince

Profile
 
 
Posted: 21 March 2010 07:07 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  4
Joined  2010-03-21

I’m sorry for providing uncomplete stanzas, the correct exchanged messages are:

the component send:

<nick >Web Presence Bot</nick></presence>

and server replies:

<nick >Web Presence Bot</nick><error code=“400” type=“modify”><bad-request ></

The registrations completes as expected and message stanzas from the user to webstatus components goes through.

I’m missing something… :-)

Best,
Vince

Profile
 
 
Posted: 23 March 2010 11:50 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  4
Joined  2010-03-21

Of course, nothing was wrong with the webstatus example :-)

If was necessary to tweak the component bot JIDs, as my first valorization of it didn’t resided into the “component domain”.

Cheers

Profile