[ejabberd] Making user who go offline still available -- in ejabberd

Deepender Singla deepender281190 at gmail.com
Sun Dec 14 14:32:34 MSK 2014


Thanks Badlop for the response, it helps.

On 12 December 2014 at 21:33, Badlop <badlop at gmail.com> wrote:
>
> How to see live input and output of function calls (in this example
> mod_disco:features_to_xml):
>
> 1. Get an erlang shell attached to ejabberd (starting it with ejabberdctl
> live)
> 2. Execute those commands in the erlang shell:
> dbg:tracer().
> dbg:p(all,[c]).
> dbg:tpl(mod_disco, features_to_xml, [{'_',[],[{message,{return_trace}}]}]).
> 3. Login with a Jabber client to ejabberd, and request the Service
> Discovery.
> 4. You will see in the erlang shell input arguments and the call result:
>
> (<0.420.0>) call
> mod_disco:features_to_xml([{{<<"http://jabber.org/protocol/commands
> ">>,<<"localhost">>}},
>  {{<<"http://jabber.org/protocol/disco#info">>,<<"localhost">>}},
>  {{<<"http://jabber.org/protocol/disco#items">>,<<"localhost">>}},
>  {{<<"http://jabber.org/protocol/pubsub">>,<<"localhost">>}},
>  {{<<"http://jabber.org/protocol/stats">>,<<"localhost">>}},
>  ...
>  <<"http://jabber.org/protocol/pubsub#subscription-options">>,
>  <<"http://jabber.org/protocol/commands">>])
> (<0.420.0>) returned from mod_disco:features_to_xml/1 -> [{xmlel,
>                                                            <<"feature">>,
>                                                            [{<<"var">>,
>
> <<"http://jabber.org/protocol/commands">>}],
>                                                            []},
>                                                           {xmlel,
>                                                            <<"feature">>,
>                                                            [{<<"var">>,
>
> <<"http://jabber.org/protocol/disco#info">>}],
>                                                            []},
>  ...
>
> Alternatively, there is a graphical debugger, run i:im(). to start it.
>
>
> --
> Badlop
> ProcessOne
>
>
> --
>
> On 9 December 2014 at 15:13, Deepender Singla <deepender281190 at gmail.com>
> wrote:
> > This might be a noob question, Is there any way in Ejabberd (i think
> must be
> > applicable to all erlang project) to use debugger in between live code,
> so
> > that I can debug code in between in the console while running to see
> what is
> > happening in and around?
> >
> > On 8 December 2014 at 19:53, Deepender Singla <deepender281190 at gmail.com
> >
> > wrote:
> >>
> >> thanks Daniel for reply, I will look into all of this.
> >>
> >> deep
> >>
> >> On 8 December 2014 at 19:29, Daniel Dormont <dan at greywallsoftware.com>
> >> wrote:
> >>>
> >>> Hi deep,
> >>>
> >>> 1) The hook doesn't fire precisely because the user who is offline is
> >>> removed from the room's participant list and so the system does not
> >>> even attempt to send them the message. This is the behavior you're
> >>> going to  need to change in the code of the MUC module itself; just
> >>> adding offline_message_hook won't do it.
> >>>
> >>> 2)  Similarly, the active participant list for a MUC is part of the
> >>> internal state of that MUC maintained in mod_muc_room. It is not, for
> >>> better or worse, stored in any table.
> >>>
> >>> dan
> >>>
> >>> On Sat, Dec 6, 2014 at 11:40 PM, Deepender Singla
> >>> <deepender281190 at gmail.com> wrote:
> >>> > Hello Folks
> >>> >
> >>> > I hope all of you are enjoying your weekend. I am also with ejabberd,
> >>> > there
> >>> > are some basic question I have:
> >>> >
> >>> > 1) offline_message_hook doesn't fired with a group chat when some
> user
> >>> > go
> >>> > offline, Is there any way I can fire it.  I was able to fire it with
> >>> > one to
> >>> > one chat.
> >>> >
> >>> > 2) Then Mickael also talked about keeping the track of participant
> list
> >>> > in
> >>> > this thread, I went through db schema and muc_room table, was not
> able
> >>> > to
> >>> > find any field for participant? Does group chat store somewhere the
> >>> > participant lists?
> >>> >
> >>> > thanks
> >>> > deep
> >>> >
> >>> > On 24 November 2014 at 18:08, Deepender Singla
> >>> > <deepender281190 at gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> thanks, Jorge.
> >>> >>
> >>> >> On 24 November 2014 at 17:28, Jorge Guntanis <jorge at telcentris.com>
> >>> >> wrote:
> >>> >>>
> >>> >>> You want to look at the mod_muc.erl file.
> >>> >>>
> >>> >>> - Jorge G.
> >>> >>>
> >>> >>> On Nov 24, 2014, at 1:29 AM, Deepender Singla
> >>> >>> <deepender281190 at gmail.com>
> >>> >>> wrote:
> >>> >>>
> >>> >>> Thanks Michael for prompt reply,  Can you point where in the
> codebase
> >>> >>> this implementation(MUC Module) is actually wrote (then it would be
> >>> >>> very
> >>> >>> easy for me to fight with it).
> >>> >>>
> >>> >>> best
> >>> >>> deep
> >>> >>>
> >>> >>> On 24 November 2014 at 14:30, Mickaël Rémond
> >>> >>> <mremond at process-one.net>
> >>> >>> wrote:
> >>> >>>>
> >>> >>>> Hello Deep,
> >>> >>>>
> >>> >>>> On 24 Nov 2014, at 04:40, Deepender Singla
> >>> >>>> <deepender281190 at gmail.com>
> >>> >>>> wrote:
> >>> >>>>
> >>> >>>> Hello Folks
> >>> >>>>
> >>> >>>> First off thanks for writing this open source implementation of
> >>> >>>> ejabberd, loved it. I am using ejabberd for a research project,
> but
> >>> >>>> there is
> >>> >>>> one change I wanted to make in implementation of server. Basically
> >>> >>>> when a
> >>> >>>> User who go offline should not exit the room, the way its happen
> in
> >>> >>>> whatsapp
> >>> >>>> also.
> >>> >>>>
> >>> >>>> I am very new to Erland and even to functional level language
> >>> >>>> (Ruby/Python guy ). Here:
> >>> >>>> http://xmpp.org/extensions/xep-0045.html#impl-service-ghosts  in
> >>> >>>> doumentation it is written, the ghost users become offline by the
> >>> >>>> server, Is
> >>> >>>> there any way or custom implementation to make them online and
> store
> >>> >>>> the
> >>> >>>> messages which they recieve they are offline and deliver to them
> >>> >>>> once they
> >>> >>>> come next time.
> >>> >>>>
> >>> >>>>
> >>> >>>> There is no generic way of doing this and it really depends on how
> >>> >>>> you
> >>> >>>> would like your service to behave.
> >>> >>>> One thing you could do is use the participant list to keep track
> of
> >>> >>>> all
> >>> >>>> users and modify the muc module to send offline messages to
> >>> >>>> participants
> >>> >>>> that are offline.
> >>> >>>>
> >>> >>>> I hope this helps,
> >>> >>>>
> >>> >>>> --
> >>> >>>> Mickaël Rémond
> >>> >>>>
> >>> >>>>
> >>> >>>> _______________________________________________
> >>> >>>> ejabberd mailing list
> >>> >>>> ejabberd at jabber.ru
> >>> >>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> >>> >>>>
> >>> >>>
> >>> >>> _______________________________________________
> >>> >>> ejabberd mailing list
> >>> >>> ejabberd at jabber.ru
> >>> >>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> >>> >>>
> >>> >>>
> >>> >>> _______________________________________________
> >>> >>> ejabberd mailing list
> >>> >>> ejabberd at jabber.ru
> >>> >>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> >>> >>>
> >>> >>
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > ejabberd mailing list
> >>> > ejabberd at jabber.ru
> >>> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >>> >
> >>> _______________________________________________
> >>> ejabberd mailing list
> >>> ejabberd at jabber.ru
> >>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> >>
> >>
> >
> >
> > _______________________________________________
> > ejabberd mailing list
> > ejabberd at jabber.ru
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20141214/858d7946/attachment.html>


More information about the ejabberd mailing list