librelist archives

« back to archive

Issue sending Messages from Inbox View and keeping Chatbox and Inbox View in sync.

Issue sending Messages from Inbox View and keeping Chatbox and Inbox View in sync.

From:
Gauri Padbidri
Date:
2015-10-08 @ 06:39
Hi JC,

 

Following screenshot is how my webpage looks :
http://screencast.com/t/BtzqaiGO2Ek

What I am trying to achieve is the following : 

 

1.       User click the Messages Menu Tab, which will list ALL the Archives.

2.       User has an option of chatting with the intended user either via
the TRADITIONAL Converse Chat boxes OR via the (custom UI) Text area for the
user that is highlighted in the Messages Tab in above screenshot.

3.       When user CLICKS Enter after having typed into the Message Tab's
Text area, we simply TRIGGER the Keypress event of the Traditional Converse
Chat box for that user.

4.       It works perfect for the most part of it. However, we see duplicate
messages, when user opens the Chat box. 

 

Looking at the code, seems like Backbone will create a Message Object, saves
it in Session Storage and triggers the "OnMessageAdded".

 

I have also tried writing CUSTOM Code (while user types from MESSAGE Tab) to
send Message Stanza and then invoke MY version of "onMessageSubmitted" which
WILL CREATE the Message Object ONLY IF the Converse Chat box is VISIBLE.
However, keeping the Converse Chat box in SYNC is a pain (Duplicate Messages
/ Messages not sorted meaning today's messages appear in yesterday's queue,
etc.). 

 

Question : Can you recommend me a few pointers as to what I can do, to keep
my messages Tab and Chat box messages in SYNC ?

 

NOTE : Messages Tab is NOT treated as a different resource. We have just
used the MAM support to populate the Messages UI and the message sending
logic is JUST the triggering of your Converse Chat Window. Also, doing the
FetchArchiveMessages query for Opening Chat Window EVERYTIME is an overkill
to our Prosody Server.

 

 

Best Regards,

Gauri Padbidri

Re: [conversejs] Issue sending Messages from Inbox View and keeping Chatbox and Inbox View in sync.

From:
Jc Brand
Date:
2015-10-10 @ 08:48
Sorry Gauri, but this question is too involved. I don't know enough about 
your setup or the underlying problem. 

Generally speaking, I think it's unrealistic and unfair to expect someone 
to solve deep technical problems such as this one in a mailing list, 
without access to the codebase/runtime and for no payment.

Even just providing "pointers" to you would mean that I need to study and 
figure out what you're doing and then figure out what needs to be done to 
solve your issue. Often coming up with "pointers" is most of the work. 
Typing out the code is not what's difficult about programming. 

The mailing list is there to help people with setup issues or with 
relatively straightforward problems.

JC 


On 08 Oktober 2015 8:39:39 vm. GMT+02:00, Gauri Padbidri 
<gpadbidri@genius-minds.com> wrote:
>Hi JC,
>
> 
>
>Following screenshot is how my webpage looks :
>http://screencast.com/t/BtzqaiGO2Ek
>
>What I am trying to achieve is the following : 
>
> 
>
>1.       User click the Messages Menu Tab, which will list ALL the
>Archives.
>
>2.       User has an option of chatting with the intended user either
>via
>the TRADITIONAL Converse Chat boxes OR via the (custom UI) Text area
>for the
>user that is highlighted in the Messages Tab in above screenshot.
>
>3.       When user CLICKS Enter after having typed into the Message
>Tab's
>Text area, we simply TRIGGER the Keypress event of the Traditional
>Converse
>Chat box for that user.
>
>4.       It works perfect for the most part of it. However, we see
>duplicate
>messages, when user opens the Chat box. 
>
> 
>
>Looking at the code, seems like Backbone will create a Message Object,
>saves
>it in Session Storage and triggers the "OnMessageAdded".
>
> 
>
>I have also tried writing CUSTOM Code (while user types from MESSAGE
>Tab) to
>send Message Stanza and then invoke MY version of "onMessageSubmitted"
>which
>WILL CREATE the Message Object ONLY IF the Converse Chat box is
>VISIBLE.
>However, keeping the Converse Chat box in SYNC is a pain (Duplicate
>Messages
>/ Messages not sorted meaning today's messages appear in yesterday's
>queue,
>etc.). 
>
> 
>
>Question : Can you recommend me a few pointers as to what I can do, to
>keep
>my messages Tab and Chat box messages in SYNC ?
>
> 
>
>NOTE : Messages Tab is NOT treated as a different resource. We have
>just
>used the MAM support to populate the Messages UI and the message
>sending
>logic is JUST the triggering of your Converse Chat Window. Also, doing
>the
>FetchArchiveMessages query for Opening Chat Window EVERYTIME is an
>overkill
>to our Prosody Server.
>
> 
>
> 
>
>Best Regards,
>
>Gauri Padbidri

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [conversejs] Issue sending Messages from Inbox View and keeping Chatbox and Inbox View in sync.

From:
Gauri Padbidri
Date:
2015-10-12 @ 08:46
Hi JC,

 

Not an issue. The issue is resolved for me J Thanks !

 

Best Regards,

Gauri Padbidri

 

From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of JC Brand
Sent: Saturday, October 10, 2015 2:18 PM
To: conversejs@librelist.com
Subject: Re: [conversejs] Issue sending Messages from Inbox View and keeping
Chatbox and Inbox View in sync.

 

Sorry Gauri, but this question is too involved. I don't know enough about
your setup or the underlying problem. 

Generally speaking, I think it's unrealistic and unfair to expect someone to
solve deep technical problems such as this one in a mailing list, without
access to the codebase/runtime and for no payment.

Even just providing "pointers" to you would mean that I need to study and
figure out what you're doing and then figure out what needs to be done to
solve your issue. Often coming up with "pointers" is most of the work.
Typing out the code is not what's difficult about programming. 

The mailing list is there to help people with setup issues or with
relatively straightforward problems.

JC 



On 08 Oktober 2015 8:39:39 vm. GMT+02:00, Gauri Padbidri
<gpadbidri@genius-minds.com> wrote:

Hi JC,

 

Following screenshot is how my webpage looks :
http://screencast.com/t/BtzqaiGO2Ek

What I am trying to achieve is the following : 

 

1.       User click the Messages Menu Tab, which will list ALL the Archives.

2.       < span style='mso-list:Ignore'>2.       User has an option of
chatting with the intended user either via the TRADITIONAL Converse Chat
boxes OR via the (custom UI) Text area for the user that is highlighted in
the Messages Tab in above screenshot.

3.       When user CLICKS Enter after having typed into the Message Tab's
Text area, we simply TRIGGER the Keypress event of the Traditional Converse
Chat box for that user.

4.       It works perfect for the most part of it. However, we see duplicate
messages, when user opens the Chat box. 

 

Looking at the code, seems like Backbone will create a Message Object, saves
it in Session Storage and triggers the "OnMessageAdded".

 

I have also tried writing CUSTOM Code (while user types from MESSAGE Tab) to
send Message Stanza and then invoke MY version of "onMessageSubmitted" which
WILL CREATE the Message Object ONLY IF the Converse Chat box is VISIBLE.
However, keeping the Converse Chat box in SYNC is a pain (Duplicate Messages
/ Messages not sorted meaning today's messages appear in yesterday's queue,
etc.). 

 

Question : Can you recommend me a few pointers as to what I can do, to keep
my messages Tab and Chat box messages in SYNC ?

 

NOTE : Messages Tab is NOT treated as a different resource. We have just
used the MAM support to populate the Messages UI and the message sending
logic is JUST the triggering of your Converse Chat Window. Also, doing the
FetchArchiveMessages query for Opening Chat Window EVERYTIME is an overkill
to our Prosody Server.

 

 

Best Regards,

Gauri Padbidri


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.