[ejabberd] externally adding roster items to mod_roster_odbc? [WHITELIST]

Yermo Lamers yml at dtlink.com
Wed Apr 1 22:54:46 MSD 2009


Exec Summary:

What's the correct way to add roster entries to mod_odbc_roster/Mysql 
from PHP?

Detail:

I am using ejabberd 2.0.1-2 from the Ubuntu archives with 
mod_roster_odbc connected to Mysql.

I would like to add items to the roster from PHP.

I understand that directly inserting entries into the rosterusers Mysql 
table, especially when users are online, is likely a Bad Idea(tm). Is 
this true?

I had tried to use mod_ctrlextra to add the the rosteritems, but 
mod_ctrlextra does not support mod_odbc:

Ref: http://www.ejabberd.im/node/3356#comment-53937

Per suggestion in the post above, I created an external module, set 
service_check_from, and attempted to send the <iq> packets to add the 
roster entries.

I keep getting:

<error code='400' type='modify'><bad-request 
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

So it's not clear to me whether I'm doing something wrong or whether 
sending <iq> packets from an external module in this fashion is simply 
not supported.

Any suggestions or pointers?

Thanks,

-- Yermo

---------------------------------------------------------------
Yermo Lamers                                        DTLink, LLC
Co-Founder & Developer                    http://www.dtlink.com

     http://www.collabinvest.net - Instant Social Investing
             Don't invest alone, Profit Together!
---------------------------------------------------------------


More information about the ejabberd mailing list