Closed Jaymassena closed 8 years ago
The relevant code is in link.js#updateActivityDates. Currently we only tickle the activity date of the linked-to entity for watch and content links. We don't tickle for likes. I believe you did not want to want to refetch and repaint just for a like, but it was a long time ago that we had that discussion.
Probably an optimization that made sense at the time. I'd like it if we could change to treat all links the same until we have a compelling reason not to. It just keeps the client logic cleaner without unneeded special cases. You could make the case that when a link is updated/inserted/deleted, the activityDate should be tickled for both the from and to entities because link represent state that effects both.
I'd like to always count on that if activityDate or modifiedDate haven't changed, there is absolutely not reason to refetch an entity. Right now I have to execute a forced fetch on entities related to a like link to make sure the cache gets the latest.
Ok, working on it now.
Likes now tickle activity date.
I'm not seeing the activityDate update when using the rest api to insert or delete a like link from a user to a message.
https://api.aircandi.com/v1/data/links