How to force INotificationController::CreateUpdate() to actually update respective Actor's Date

Hi,

when using  INotificationController::CreateUpdate() for an existing notification, I have noticed that the date for an Actor is not updated, in case the
author is already present on the authors list.

Does anyone know of a way to force the respective date to be updated?

Currently the only workaround I can think of is to read the notification, and update it twice, first to remove the author and then add it back again with updated date.

Is there a better way without incurring such performance hit?

Thanks in advance.

  • You can update the notification's last update date by calling CreateUpdate with a LastUpdate date but no actor additions/removals. There is not a way to update the actor's individual add date. 

    Your workaround would work as long as there are other actors on the notification. When you remove the last actor, the notification itself will be deleted so you'd be creating a new notification if removing the last actor and then attempting to the actor back.

  • Thanks for the reply.

    So basically there is no way to track down who was the last person responsible for a notification being sent, when it is still alive (it already exists for the related ContentId / ContentTypeId pair)?

    I guess this implies we need to rely on other mechanims for this kind of activity tracking.

  • You could use the notification's extended attributes to store custom data (for example, the most recent actor on the content). I don't know the specifics of your use case to know if this would help.