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

runfix: set creation message timestamp to 0 after clearing content #16549

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

PatrykBuniX
Copy link
Contributor

Description

When clearing a conversation content we should set conversation creation message's timestamp to 0 instead of the current date. When it was set to a current date, and we've imported a backup, creation message would appear as the most recent message (See screenshots below).

Screenshots/Screencast (for UI changes)

Before
Screenshot 2024-01-18 at 12 14 52

After
Screenshot 2024-01-18 at 12 17 42

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Important details for the reviewers

(Delete this section if unnecessary)

  • use (x) data
  • can be reviewed commit-by-commit
  • be sure to look at ...

await this.addCreationMessage(conversation, !!this.userState.self()?.isTemporaryGuest(), timestamp);
await this.addCreationMessage(conversation, !!this.userState.self()?.isTemporaryGuest());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual fix, 0 is a default timestamp param for .addCreationMessage method.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cd84402) 45.42% compared to head (aa803f6) 45.43%.
Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #16549   +/-   ##
=======================================
  Coverage   45.42%   45.43%           
=======================================
  Files         740      740           
  Lines       24238    24239    +1     
  Branches     5506     5506           
=======================================
+ Hits        11011    11013    +2     
  Misses      11818    11818           
+ Partials     1409     1408    -1     

@PatrykBuniX PatrykBuniX merged commit d4a285f into dev Jan 18, 2024
10 checks passed
@PatrykBuniX PatrykBuniX deleted the runfix/clear-content-creation-message-time branch January 18, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants