Cht-core: Received messages appear as sent messages

Created on 28 Mar 2020  路  7Comments  路  Source: medic/cht-core

Describe the bug
In the Messages tab, when a message is sent the received messages shown above don't display properly, and appear as sent messages with content mixed with sent messages. Messages all appear as expected after refreshing the page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Messages to a contact with received messages
  2. Send a message
  3. See Received messages

Expected behavior
Appearance of sent and received messages should not change when a new message is sent.

Screenshots
Progression from left to right, prior to sending, immediately after, and then after refreshing:
image

Environment

  • Instance: cht-covid.dev
  • Browser: Chrome 80
  • Client platform: Windows
  • App: webapp, logged in as admin user
  • Version: ciha-rapidpro-support, which is branched off of 3.8 but no known changes to the Messages tab.

Additional context
Refreshing resets the messages to their expected location and color.

Messages 1 - High Bug

All 7 comments

Thanks for flagging this @abbyad cc @michaelkohn

Ready for AT on 6335-correct-message-labels.
A bunch of message actions have been refactored, so please make sure that loading long treads works correctly, also updates to loaded threads.
(do remember that admins don't watch the changes feed with include_docs, so to view new received messages that are not authored by themselves, they need to refresh the page).

A bunch of message actions have been refactored, so please make sure that loading long treads works correctly, also updates to loaded threads.

I had noticed just recently that clicking between message conversations before the previous one is fully loaded can end up merging both conversation threads. Keep that in mind with testing this issue, and report if it is happening.

@abbyad if this happened before, I don't think anything I've changed in my PR would have fixed it, unfortunately.

I am AT this ticket.

This looks good to me. Tested larger convos, convos back n forth offline and letting it sync on the timer and seeing the message order correct. @dianabarsan feel free to merge and close.

Merged.

Was this page helpful?
0 / 5 - 0 ratings