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

chore: Adapt some messaging features to work without the DB watcher #30408

Merged
merged 38 commits into from
Nov 23, 2023

Conversation

MarcosSpessatto
Copy link
Member

@MarcosSpessatto MarcosSpessatto commented Sep 15, 2023

Proposed changes (including videos or screenshots)

This PR adapts the following features to work without the DB watcher:

  • Send message;
  • Update message;
  • Delete message;
  • Save system messages (only the ones sent through the MessageService)
  • Discussions;

ARCH-1209
ARCH-1210
ARCH-1211
ARCH-1212
ARCH-1213
ARCH-1215
ARCH-1216
ARCH-1241
ARCH-1234
ARCH-1230

Issue(s)

Steps to test or reproduce

Further comments

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2023

⚠️ No Changeset found

Latest commit: 697e871

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #30408 (697e871) into develop (b1614cb) will increase coverage by 4.78%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #30408      +/-   ##
===========================================
+ Coverage    46.31%   51.09%   +4.78%     
===========================================
  Files          766      807      +41     
  Lines        14675    15141     +466     
  Branches      2753     2820      +67     
===========================================
+ Hits          6797     7737     +940     
+ Misses        7479     6969     -510     
- Partials       399      435      +36     
Flag Coverage Δ
e2e 47.99% <ø> (+5.59%) ⬆️
unit 66.21% <ø> (ø)

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

@MarcosSpessatto MarcosSpessatto marked this pull request as ready for review November 3, 2023 19:32
@MarcosSpessatto MarcosSpessatto requested review from a team as code owners November 3, 2023 19:32
@MarcosSpessatto MarcosSpessatto changed the title chore: Adapt some features to work without the DB watcher chore: Adapt some messaging features to work without the DB watcher Nov 9, 2023
Base automatically changed from chore/remove-message-db-watcher-1 to develop November 23, 2023 12:50
@sampaiodiego sampaiodiego requested a review from a team as a code owner November 23, 2023 12:50
apps/meteor/app/lib/server/functions/deleteMessage.ts Outdated Show resolved Hide resolved
callbacks.add(
'afterSaveMessage',
(message, room) => notifyUsersOnMessage(message, room),
callbacks.priority.MEDIUM,
Copy link
Member

Choose a reason for hiding this comment

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

any reason to change this to MEDIUM? just curious

Copy link
Member Author

Choose a reason for hiding this comment

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

This comes from the discussion feature. I changed that because I need that to run before the discussion callback, otherwise, we would end up without the correct number of messages within that room.

await Rooms.incMsgCountAndSetLastMessageById(message.rid, 1, message.ts, settings.get('Store_Last_Message') && message);

@sampaiodiego sampaiodiego merged commit edb4e2c into develop Nov 23, 2023
42 checks passed
@sampaiodiego sampaiodiego deleted the chore/adapt-message-events-without-db-watcher branch November 23, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants