[openstreetmap/openstreetmap-website] Add UserActivities module for structured user activity history (PR #5761)
Emin Kocan
notifications at github.com
Mon Mar 24 14:03:11 UTC 2025
@kcne commented on this pull request.
> + SELECT DATE_TRUNC('day', diary_comments.created_at) AS day FROM diary_comments WHERE user_id = :user_id AND visible = true
+ UNION ALL
+ SELECT DATE_TRUNC('day', gpx_files.timestamp) AS day FROM gpx_files WHERE user_id = :user_id
+ SQL
+ end
+
+ # Fetch activities for specific days
+ private_class_method def self.fetch_activities(user_id, days)
+ [
+ fetch_changesets(user_id, days),
+ fetch_diary_entries(user_id, days),
+ fetch_changeset_comments(user_id, days),
+ fetch_note_comments(user_id, days),
+ fetch_diary_comments(user_id, days),
+ fetch_gpx_files(user_id, days)
+ ].flatten
Fixed.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5761#discussion_r2010249229
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5761/review/2710508710 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250324/4fed4f2f/attachment.htm>
More information about the rails-dev
mailing list