sending messages from command prompt (cli) or another process

526 views
Skip to first unread message

Marek Vavrečan

unread,
Nov 21, 2013, 9:07:01 PM11/21/13
to proso...@googlegroups.com
Hi,
I have custom messaging service on web app and I want to use prosody as xmpp server. 
There is logic on the web app that is handling whole messaging system (users, messaging, message storage, etc).  

I was able to implement custom auth module that uses and calls my api to verify user by email and password - I am struggling with how to efficiently send messages from my api back to prosody - so that people using my web app can communicate with xmpp clients and vice versa.  

I looked into prosodyctl that communicates with prosody processes and is able to create / modify users. 
but I am wondering - how to call prosody over cli to send message from some user to another user? I want be able to call message/bare and/or message/full events from different process. 
Currently I am sending messages from my api over simple xmpp client - but this seems like overload for me and I wish to do it directly.

Please help if you have any details how to do this :) I would like to write article after my integration is complete so it can help everybody who wants to do the same thing with prosody.

Lonnie Abelbeck

unread,
Nov 22, 2013, 5:36:15 PM11/22/13
to proso...@googlegroups.com
Matthew has written an xmpp client 'clix', it works well for my purposes, the thread is in the "users' list:

https://groups.google.com/forum/#!searchin/prosody-users/Command$20Line$20Jabber$20Client$20Notify/prosody-users/PrPL_8nHIuk/WxNVr_meSbcJ

Lonnie
> --
> You received this message because you are subscribed to the Google Groups "prosody-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prosody-dev...@googlegroups.com.
> To post to this group, send email to proso...@googlegroups.com.
> Visit this group at http://groups.google.com/group/prosody-dev.
> For more options, visit https://groups.google.com/groups/opt_out.

Marek Vavrečan

unread,
Nov 22, 2013, 7:05:56 PM11/22/13
to proso...@googlegroups.com, li...@lonnie.abelbeck.com
Basically it is xmpp client what I wanted to avoid - I want to call prosody IM api directly
Perhaps creating module that would listen on unix domain socket would do the trick if no way around. 

Matthew Wild

unread,
Nov 22, 2013, 7:26:33 PM11/22/13
to Prosody IM Developers Group
Hi,

On 23 November 2013 00:05, Marek Vavrečan <vavr...@gmail.com> wrote:
> Basically it is xmpp client what I wanted to avoid - I want to call prosody
> IM api directly
> Perhaps creating module that would listen on unix domain socket would do the
> trick if no way around.

Perhaps https://code.google.com/p/prosody-modules/wiki/mod_post_msg is
close to what you want?

Regards,
Matthew

Marek Vavrečan

unread,
Nov 23, 2013, 2:11:00 PM11/23/13
to proso...@googlegroups.com
thank you Matthew! that seems to something I was looking for 

Marek Vavrečan

unread,
Nov 26, 2013, 11:52:58 AM11/26/13
to proso...@googlegroups.com
Here is how I did it - https://github.com/vavrecan/prosody-custom-interface
Some improvements are still needed but it does all I wanted.
Thanks for help
Reply all
Reply to author
Forward
0 new messages