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(react): update lastMessageUpdate consistently with Webchat Settings #1355

Closed
wants to merge 1 commit into from

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Mar 8, 2021

Description

  • Update logic to be consistent when resending WebchatSettings.

Linked PR: https://github.com/metis-ai/hubtype-backend/pull/552

Copy link
Contributor

@asastre asastre left a comment

Choose a reason for hiding this comment

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

Since WebchatSettings is not a message by itself I don't know if it make sense to update the last message date. What do you think?

@vanbasten17
Copy link
Contributor Author

@asastre it's true that is not a message itself, but when resending unread messages from backend, the last message update date should be taken into account in order to not send additional WebchatSettings messages.

@vanbasten17 vanbasten17 marked this pull request as draft March 23, 2021 14:01
@vanbasten17 vanbasten17 force-pushed the fix/resent-webchat-settings branch from ce0c0ff to 5fdab44 Compare March 24, 2021 12:35
@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #1355 (c88fbe1) into master (8581b75) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1355      +/-   ##
==========================================
- Coverage   63.20%   63.19%   -0.01%     
==========================================
  Files         252      252              
  Lines        7075     7076       +1     
  Branches     1182     1182              
==========================================
  Hits         4472     4472              
- Misses       2261     2262       +1     
  Partials      342      342              
Flag Coverage Δ
botonic-react 57.57% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
packages/botonic-react/src/webchat/webchat.jsx 47.70% <0.00%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8581b75...c88fbe1. Read the comment docs.

@vanbasten17 vanbasten17 force-pushed the fix/resent-webchat-settings branch from 5fdab44 to 183405a Compare March 24, 2021 12:37
@vanbasten17 vanbasten17 force-pushed the fix/resent-webchat-settings branch from 183405a to c88fbe1 Compare March 24, 2021 15:42
@vanbasten17
Copy link
Contributor Author

@asastre , you were right, there is no need to update the lastMessageDate. When doing the auth call, last message id will be the previous one just before the WebchatSettings in DB. So I'm closing this PR atm. It's a backend issue.

@vanbasten17 vanbasten17 deleted the fix/resent-webchat-settings branch March 25, 2021 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants