librelist archives

« back to archive

Fwd: Converse JS

Fwd: Converse JS

From:
Michał Kosyk
Date:
2014-10-10 @ 08:34
Hi,

First of all - i'd like to thank you for the wonderful tool you provided.
ConverseJs is a great thing to have, support and to expand it's features.
The simplicity to just make it work is amazing. One day and it's running
like a charm. You want it all over your app? No problem - here you go, have
fun and you're welcome. I'd recommend it to every single web developer to
use it.

But...

Although it has all those major positives it lacks some things.

The ability for this plugin to actually communicate with the website or
even an advanced web application in two ways. Okay, i can open the
communicator, write stuff and send it then receive some other stuff. But is
there any way i can open a chatbox with a button placed in my web app? I
can't find any method for it (the converse instance has 5 functions). I'm
looking throughout the code and this would be an obvious relief to have a
tiny method that would open the chatbox after passing a object returned by
the getBuddy(jid) method.

Or just to send some stuff via XMPP protocol using methods from the
ConverseJs.

You know, simple stuff but still - those thing would be a great
advancement, especialy for the developers.

My questions for today is:
-Is there any way for openning the chatbox from within the web app
and if not:
-Is there any simple way (maybe you could give me a suggestion about this)
to write a few line of code method/function to do that?

Once again - thank you for this amazing, simple to use plugin. We were
thinking about making it from scratch, creating a completly new system but
thanks to the XMPP server and your ConverseJs we made a immediate step
forward.

Cheers,
Michael

Re: [conversejs] Fwd: Converse JS

From:
Jc Brand
Date:
2014-10-10 @ 09:09
Hi Michał

Thanks for the kind words, much appreciated. Improvements or new features are
very welcome.

I completely agree with you that converse.js does not have a proper API that
allows other apps to properly communicate and interact with it.

There is a ticket for this, but not much work has been done:
https://github.com/jcbrand/converse.js/issues/46

I initially didn't do much work on the API, because the person who opened that
ticket said he would come up with a first draft (which in the end he never
did).

The ability to open chat boxes has now been asked for by multiple people.
I'll try to add the API method soon (perhaps before Monday).

If you want to try adding some API methods yourself, take a look at how I added
the "getBuddy" API method: https://github.com/jcbrand/converse.js/issues/223

Adding an "openChat" method is tricky enough that I can't easily tell you what
to do without investigating it myself first.

Regards
JC


On Fri, Oct 10, 2014 at 10:34:50AM +0200, Michał Kosyk wrote:
>    Hi,
>    First of all - i'd like to thank you for the wonderful tool you provided.
>    ConverseJs is a great thing to have, support and to expand it's features.
>    The simplicity to just make it work is amazing. One day and it's running
>    like a charm. You want it all over your app? No problem - here you go,
>    have fun and you're welcome. I'd recommend it to every single web
>    developer to use it.
>    But...
>    Although it has all those major positives it lacks some things.
>    The ability for this plugin to actually communicate with the website or
>    even an advanced web application in two ways. Okay, i can open the
>    communicator, write stuff and send it then receive some other stuff. But
>    is there any way i can open a chatbox with a button placed in my web app?
>    I can't find any method for it (the converse instance has 5 functions).
>    I'm looki ng throughout the code and this would be an obvious relief to
>    have a tiny method that would open the chatbox after passing a object
>    returned by the getBuddy(jid) method.
>    Or just to send some stuff via XMPP protocol using methods from the
>    ConverseJs.
>    You know, simple stuff but still - those thing would be a great
>    advancement, especialy for the developers.
>    My questions for today is:
>    -Is there any way for openning the chatbox from within the web app
>    and if not:
>    -Is there any simple way (maybe you could give me a suggestion about this)
>    to write a few line of code method/function to do that?
>    Once again - thank you for this amazing, simple to use plugin. We were
>    thinking about making it from scratch, creating a completly new system but
>    thanks to the XMPP server and your ConverseJs we made a immediate step
>    forward.
>    Cheers,
>    Mich ael

Re: [conversejs] Fwd: Converse JS

From:
Michał Kosyk
Date:
2014-10-10 @ 09:19
Thanks for the anwser.

I'll try to read the code and start to make this function (although i have
other issues that are in need of attending to).

We'll see. If i come with something i'll send you a sketch of my function
to consult it with you.

Regards,
Michael

On Fri, Oct 10, 2014 at 11:09 AM, JC Brand <lists@opkode.com> wrote:

> Hi Michał
>
> Thanks for the kind words, much appreciated. Improvements or new features
> are
> very welcome.
>
> I completely agree with you that converse.js does not have a proper API
> that
> allows other apps to properly communicate and interact with it.
>
> There is a ticket for this, but not much work has been done:
> https://github.com/jcbrand/converse.js/issues/46
>
> I initially didn't do much work on the API, because the person who opened
> that
> ticket said he would come up with a first draft (which in the end he never
> did).
>
> The ability to open chat boxes has now been asked for by multiple people.
> I'll try to add the API method soon (perhaps before Monday).
>
> If you want to try adding some API methods yourself, take a look at how I
> added
> the "getBuddy" API method:
> https://github.com/jcbrand/converse.js/issues/223
>
> Adding an "openChat" method is tricky enough that I can't easily tell you
> what
> to do without investigating it myself first.
>
> Regards
> JC
>
>
> On Fri, Oct 10, 2014 at 10:34:50AM +0200, Michał Kosyk wrote:
> >    Hi,
> >    First of all - i'd like to thank you for the wonderful tool you
> provided.
> >    ConverseJs is a great thing to have, support and to expand it's
> features.
> >    The simplicity to just make it work is amazing. One day and it's
> running
> >    like a charm. You want it all over your app? No problem - here you go,
> >    have fun and you're welcome. I'd recommend it to every single web
> >    developer to use it.
> >    But...
> >    Although it has all those major positives it lacks some things.
> >    The ability for this plugin to actually communicate with the website
> or
> >    even an advanced web application in two ways. Okay, i can open the
> >    communicator, write stuff and send it then receive some other stuff.
> But
> >    is there any way i can open a chatbox with a button placed in my web
> app?
> >    I can't find any method for it (the converse instance has 5
> functions).
> >    I'm looki ng throughout the code and this would be an obvious relief
> to
> >    have a tiny method that would open the chatbox after passing a object
> >    returned by the getBuddy(jid) method.
> >    Or just to send some stuff via XMPP protocol using methods from the
> >    ConverseJs.
> >    You know, simple stuff but still - those thing would be a great
> >    advancement, especialy for the developers.
> >    My questions for today is:
> >    -Is there any way for openning the chatbox from within the web app
> >    and if not:
> >    -Is there any simple way (maybe you could give me a suggestion about
> this)
> >    to write a few line of code method/function to do that?
> >    Once again - thank you for this amazing, simple to use plugin. We were
> >    thinking about making it from scratch, creating a completly new
> system but
> >    thanks to the XMPP server and your ConverseJs we made a immediate step
> >    forward.
> >    Cheers,
> >    Mich ael
>

Re: [conversejs] Fwd: Converse JS

From:
Michał Kosyk
Date:
2014-10-10 @ 13:06
Ok, so i'm at the point of a dead end. I added a function to the
converse.js itself and a function in the statement that returns an instance
of a Converse object. The weird thing is my app sees all the old functions
like "getBuddy", "initialize" or "getRID" but somehow my new function
doesn't tag along with the grunt minify and grunt build. I'm not a super
specialist with the JS (i made quite big app using Sencha's ExtJs but
that's it) so i'm asking - what could be the problem here?

On Fri, Oct 10, 2014 at 11:19 AM, Michał Kosyk <gager33@gmail.com> wrote:

> Thanks for the anwser.
>
> I'll try to read the code and start to make this function (although i have
> other issues that are in need of attending to).
>
> We'll see. If i come with something i'll send you a sketch of my function
> to consult it with you.
>
> Regards,
> Michael
>
> On Fri, Oct 10, 2014 at 11:09 AM, JC Brand <lists@opkode.com> wrote:
>
>> Hi Michał
>>
>> Thanks for the kind words, much appreciated. Improvements or new features
>> are
>> very welcome.
>>
>> I completely agree with you that converse.js does not have a proper API
>> that
>> allows other apps to properly communicate and interact with it.
>>
>> There is a ticket for this, but not much work has been done:
>> https://github.com/jcbrand/converse.js/issues/46
>>
>> I initially didn't do much work on the API, because the person who opened
>> that
>> ticket said he would come up with a first draft (which in the end he never
>> did).
>>
>> The ability to open chat boxes has now been asked for by multiple people.
>> I'll try to add the API method soon (perhaps before Monday).
>>
>> If you want to try adding some API methods yourself, take a look at how I
>> added
>> the "getBuddy" API method:
>> https://github.com/jcbrand/converse.js/issues/223
>>
>> Adding an "openChat" method is tricky enough that I can't easily tell you
>> what
>> to do without investigating it myself first.
>>
>> Regards
>> JC
>>
>>
>> On Fri, Oct 10, 2014 at 10:34:50AM +0200, Michał Kosyk wrote:
>> >    Hi,
>> >    First of all - i'd like to thank you for the wonderful tool you
>> provided.
>> >    ConverseJs is a great thing to have, support and to expand it's
>> features.
>> >    The simplicity to just make it work is amazing. One day and it's
>> running
>> >    like a charm. You want it all over your app? No problem - here you
>> go,
>> >    have fun and you're welcome. I'd recommend it to every single web
>> >    developer to use it.
>> >    But...
>> >    Although it has all those major positives it lacks some things.
>> >    The ability for this plugin to actually communicate with the website
>> or
>> >    even an advanced web application in two ways. Okay, i can open the
>> >    communicator, write stuff and send it then receive some other stuff.
>> But
>> >    is there any way i can open a chatbox with a button placed in my web
>> app?
>> >    I can't find any method for it (the converse instance has 5
>> functions).
>> >    I'm looki ng throughout the code and this would be an obvious relief
>> to
>> >    have a tiny method that would open the chatbox after passing a object
>> >    returned by the getBuddy(jid) method.
>> >    Or just to send some stuff via XMPP protocol using methods from the
>> >    ConverseJs.
>> >    You know, simple stuff but still - those thing would be a great
>> >    advancement, especialy for the developers.
>> >    My questions for today is:
>> >    -Is there any way for openning the chatbox from within the web app
>> >    and if not:
>> >    -Is there any simple way (maybe you could give me a suggestion about
>> this)
>> >    to write a few line of code method/function to do that?
>> >    Once again - thank you for this amazing, simple to use plugin. We
>> were
>> >    thinking about making it from scratch, creating a completly new
>> system but
>> >    thanks to the XMPP server and your ConverseJs we made a immediate
>> step
>> >    forward.
>> >    Cheers,
>> >    Mich ael
>>
>
>

Re: [conversejs] Fwd: Converse JS

From:
Jc Brand
Date:
2014-10-12 @ 09:17
On Fri, Oct 10, 2014 at 03:06:30PM +0200, Michał Kosyk wrote:
>    Ok, so i'm at the point of a dead end. I added a function to the
>    converse.js itself and a function in the statement that returns an
>    instance of a Converse object. The weird thing is my app sees all the old
>    functions like "getBuddy", "initialize" or "getRID" but somehow my new
>    function doesn't tag along with the grunt minify and grunt build. I'm not
>    a super specialist with the JS (i made quite big app using Sencha's ExtJs
>    but that's it) so i'm asking - what could be the problem here?

There is no "grunt build" step, perhaps you're thinking of "grunt minjs", which
creates the JS builds.

I've now added 2 new API methods, openChatBox and getChatBox. You can refer to
the last 3 commits referenced in ticket #46.

I didn't make new builds yet.

>    On Fri, Oct 10, 2014 at 11:19 AM, Michał Kosyk <[1]gager33@gmail.com>
>    wrote:
> 
>      Thanks for the anwser.
>      I'll try to read the code and start to make this function (alth ough i
>      have other issues that are in need of attending to).
>      We'll see. If i come with something i'll send you a sketch of my
>      function to consult it with you.
>      Regards,
>      Michael
>      On Fri, Oct 10, 2014 at 11:09 AM, JC Brand <[2]lists@opkode.com> wrote:
> 
>        Hi Michał
> 
>        Thanks for the kind words, much appreciated. Improvements or new
>        features are
>        very welcome.
> 
>        I completely agree with you that converse.js does not have a proper
>        API that
>        allows other apps to properly communicate and interact with it.
> 
>        There is a ticket for this, but not much work has been done:
>        [3]https://github.com/jcbrand/converse.js/issues/46
> 
>        I initially didn't do much work on the API, because the person who
>        opened that
>        ticket said he would come up with a first draft (which in the end he
>        never
>        did).
> 
>        The ability to open chat boxes has now been asked for by multiple
>        people.
>        I'll try to add the API method soon (perhaps before Monday).
> 
>        If you want to try adding some API methods yourself, take a look at
>        how I added
>        the "getBuddy" API method:
>        [4]https://github.com/jcbrand/converse.js/issues/223
> 
>        Adding an "openChat" method is tricky enough that I can't easily tell
>        you what
>        to do without investigating it myself first.
> 
>        Regards
>        JC
> 
>        On Fri, Oct 10, 2014 at 10:34:50AM +0200, Michał Kosyk wrote:
>        >    Hi,
>        >    First of all - i'd like to thank you for the wonderful tool you
>        provided.
>        >    ConverseJs is a great thing to have, support and to expand it's
>        features.
>        >    The simplicity to just make it work is amazing. One day and it's
>        running
>        >    like a charm. You want it all over your app? No problem - here
>        you go,
>        >    have fun and you're welcome. I'd recommend it to every single web
>        >    developer to use it.
>        >    But...
>        >    Although it has all those major positives it lacks some things.
>        >    The ability for this plugin to actually communicate with the
>        website or
>        >    even an advanced web application in two ways. Okay, i can open
>        the
>        >    communicator, write stuff and send it then receive some other
>        stuff. But
>        >    is there any way i can open a chatbox with a button placed in my
>        web app?
>        >    I can't find any method for it (the converse instance has 5
>        functions).
>        >    I'm looki ng throughout the code and this would be an obvious
>        relief to
>        >    have a tiny method that would open the chatbox after passing a
>        object
>        >    returned by the getBuddy(jid) method.
>        >    Or just to send some stuff via XMPP protocol using methods from
>        the
>        >    ConverseJs.
>        >    You know, simple stuff but still - those thing would be a great
>        >    advancement, especialy for the developers.
>        >    My questions for today is:
>        >    -Is there any way for openning the chatbox from within the web
>        app
>        >    and if not:
>        >    -Is there any simple way (maybe you could give me a suggestion
>        about this)
>        >    to write a few line of code method/function to do that?
>        >    Once again - thank you for this amazing, simple to use plugin. We
>        were
>        >    thinking about making it from scratch, creating a completly new
>        system but
>        >    thanks to the XMPP server and your ConverseJs we made a immediate
>        step
>        >    forward.
>        >    Cheers,
>        >    Mich ael
> 
> References
> 
>    Visible links
>    1. mailto:gager33@gmail.com
>    2. mailto:lists@opkode.com
>    3. https://github.com/jcbrand/converse.js/issues/46
>    4. https://github.com/jcbrand/converse.js/issues/223