Skip to content

Deduplicates guard clause for user activity

Vijay Hawoldar requested to merge vij-deduplicate-activity-conditions into master

What does this MR do and why?

Removes duplicated condition before updating a user's last activity timestamp.

This is a precursor to modifying the Users::ActivityService to also update the relevant Member#last_activity_on as part of #461338.

The eventual goal is for the activity service to handle:

  1. updating the User#last_activity_on as it currently does
  2. triggering an update (possibly via a different service, TBD) of Member#last_activity_on

2 needs to happen even if 1 has already happened once on the current day, so moving this guard clause means we can more easily bypass it to trigger 2 regardless.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Vijay Hawoldar

Merge request reports