philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

Fix gallery notifications timestamps #213

Closed mdashlw closed 3 months ago

mdashlw commented 3 months ago

Before you begin


Galleries currently have only one instance of Notification where they are the actor and child actor is nil. Not having a child actor causes that notification to have the same created_at and updated_at fields because child actor is the only thing that ever changes in a Notification. The issue is that notifications page uses notifcation.updated_at timestamp, so currently it displays when the first image was added to a gallery which could be years ago. This PR resolves it by making child actor the added image which forces updated_at to update.