librelist archives

« back to archive

Reg: Offline message delivery

Reg: Offline message delivery

From:
Gowthaman m
Date:
2015-05-20 @ 06:14
Hi all
    When user sends message with no Internet connection then those message
has to be delivered as soon as he is connected to the internet. Similar to
hangout/watsapp.
  *Is there any way to achieve it  through conversejs?*

-- 




Thanks

Gowthaman M <http://erated.me/p/gowthaman-murugan/>

Re: [conversejs] Reg: Offline message delivery

From:
Jc Brand
Date:
2015-05-20 @ 07:24
On Wed, May 20, 2015 at 11:44:04AM +0530, Gowthaman m wrote:
>    Hi all  
>        When user sends message with no Internet connection then those message
>    has to be delivered as soon as he is connected to the internet. Similar to
>    hangout/watsapp.
>      Is there any way to achieve it  through conversejs?

If the user is not connected with any other clients/resources, then the
messages will be delivered the next time the user comes online.

This is standard XMPP behavior.

If there is another connected client/resources, then that client will receive
the messages and any other client that comes online later will not again
receive the messages.

Re: [conversejs] Reg: Offline message delivery

From:
Gowthaman m
Date:
2015-05-20 @ 09:15
Hi JC Brand,

   Thanks for your reply.But what I need is while am chatting if my
internet connection goes off.Whether the  messages I have sent in the
offline it will be delivered to the client or not.*If not,How can I achieve
it?*



On Wed, May 20, 2015 at 12:54 PM, JC Brand <lists@opkode.com> wrote:

> On Wed, May 20, 2015 at 11:44:04AM +0530, Gowthaman m wrote:
> >    Hi all
> >        When user sends message with no Internet connection then those
> message
> >    has to be delivered as soon as he is connected to the internet.
> Similar to
> >    hangout/watsapp.
> >      Is there any way to achieve it  through conversejs?
>
> If the user is not connected with any other clients/resources, then the
> messages will be delivered the next time the user comes online.
>
> This is standard XMPP behavior.
>
> If there is another connected client/resources, then that client will
> receive
> the messages and any other client that comes online later will not again
> receive the messages.
>



-- 




Thanks

Gowthaman M <http://erated.me/p/gowthaman-murugan/>

Re: [conversejs] Reg: Offline message delivery

From:
Jc Brand
Date:
2015-05-20 @ 09:46
On Wed, May 20, 2015 at 02:45:30PM +0530, Gowthaman m wrote:
>    Hi JC Brand,
>        
>       Thanks for your reply.But what I need is while am chatting if my
>    internet connection goes off.Whether the  messages I have sent in the
>    offline it will be delivered to the client or not.If not,How can I achieve
>    it?

The messages you write are created as Backbone.Model objects and stored in the
browser's sessionStorage.

So the solution would be to send the unsent messages once converse.js
reconnects.

The challenge is knowing which messages were sent and which weren't.

Also, this would only work if you reconnected in the same session. Otherwise
you would need to use localStorage and in that case it would still only work if
you used the same browser.

JC