Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: livechat stuck unread counter on new messages #33229

Merged
merged 7 commits into from
Oct 9, 2024

Conversation

ricardogarim
Copy link
Contributor

@ricardogarim ricardogarim commented Sep 7, 2024

This pull request addresses the issue described in CORE-674, where the unread message counter does not update when a livechat visitor, with the widget minimized, receives their first response from an agent. The problem occurs because the lastReadMessageId is absent from the livechat client's state, and the getUnreadMessages function does not handle this situation correctly.

Shoutout to @ggazzo for helping address the changes correctly within the widget code!

Copy link
Contributor

dionisio-bot bot commented Sep 7, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Sep 7, 2024

🦋 Changeset detected

Latest commit: aa11286

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/livechat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.60%. Comparing base (6843990) to head (aa11286).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #33229      +/-   ##
===========================================
+ Coverage    58.58%   59.60%   +1.01%     
===========================================
  Files         2737     2602     -135     
  Lines        65676    63664    -2012     
  Branches     14824    14289     -535     
===========================================
- Hits         38477    37947     -530     
+ Misses       24420    22998    -1422     
+ Partials      2779     2719      -60     
Flag Coverage Δ
unit 75.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@ricardogarim ricardogarim changed the title fix: livechat stuck unread counter on new messages in new room fix: livechat stuck unread counter on new messages Sep 9, 2024
@ricardogarim ricardogarim added this to the 6.13 milestone Sep 9, 2024
@ricardogarim ricardogarim marked this pull request as ready for review September 9, 2024 10:59
@ricardogarim ricardogarim requested review from a team as code owners September 9, 2024 10:59
Copy link
Member

@ggazzo ggazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests ;)

packages/livechat/src/lib/main.js Outdated Show resolved Hide resolved
chore: refactor processUnread for readability

chore: add changeset

r

a
Copy link
Contributor

github-actions bot commented Sep 14, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-10-09 23:19 UTC

abhinavkrin
abhinavkrin previously approved these changes Sep 23, 2024
@scuciatto scuciatto modified the milestones: 6.13, 7.0, 6.14 Sep 23, 2024
@jessicaschelly jessicaschelly added stat: QA assured Means it has been tested and approved by a company insider and removed stat: needs testing labels Oct 8, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 8, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Oct 8, 2024
@ggazzo ggazzo merged commit a15b925 into develop Oct 9, 2024
11 checks passed
@ggazzo ggazzo deleted the fix/livechat-counter branch October 9, 2024 23:19
@ggazzo ggazzo modified the milestones: 6.14, 7.0 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants