Fix "Unread notifications for child messages"
Closes #2244 (closed)
-
child messages being stored with other unread messages -
unread banner opens TMF -
viewing unread messages in TMF marks them as read -
handle situation where the banner hides at the bottom of MMF even though there are unread thread messages -
include threaded messages in email notifications -
mark all child messages as read if the feature toggle is off or disable this whole feature. - when distributing unread messages we don't know whether the users have feature toggle off or on
The diff line count is large just because of a redesign of a chat-item
test structure and resulting change in one snapshot file
Testing strategy
-
have user A and B in a room
-
let user A send 20 messages to the room, e.g. just numbers 1,2,3,4,5,6,7,8,9,0,1,2...
-
then start a thread on a few of those messages
-
let user B enter the room with small viewport (so all 20 messages won't fit on 1 screen)
- validate you see both top and bottom unread banner (top with all messages above the fold and bottom with the number of thread messages)
- clicking the top banner takes you to the first unread message
- clicking the bottom banner takes you down to the first unread bellow the fold
- when reading through all MMF messages, the bottom banner still shows the number of unread thread messages
- clicking the banner should open the TMF with the oldest thread message and then every next click opens the next TMF
- viewing the thread message in TMF marks it as read
-
Try to add a few mentions here and there. Note that they always take precedence over unreads
-
the child messages are automatically included in the unread notification email
- User A and B are in a room. User A creates a thread message
- Add the Mandrill webapp prod secrets to your local webapp
.env
file- Don't forget to re-export the
.env
into your updated environment, https://gitlab.com/gitlab-org/gitter/webapp#configure-service-secrets - You can skip this step if you want to use the fake mailer
- Don't forget to re-export the
- wait 1 minute and then run the cron task
./scripts/crons/send-unread-notifications.js
- User B should have email with the thread message in their mailbox
Edited by Tomas Vik (OOO back on 2024-08-12)