Yes, I asked if there is a function to check if a specific node has comments or is favorited so I can implement a behaviour following that event. For example, if someone add a comment to a file, a notification should appear to other users.
You should be able to create a behavior on the type used for comments and then follow them back to the docs being commented upon and then determine if you want to send a notification.
Favorites are a little more tricky. They are stored in a JSON preferences file per user. As such you could create a behavior that monitors for changes in these, but it likely would be challenging to know what changed unless you cache the previous state somehow. For example you make a copy of each user profile and then when a profile is updated you compare it to the copy. Perform your business logic and then replace the copy with the current profile.
So I think you can acheive what you want, but I don't think there is a per-baked way to do either of these things.