How to delete message entities (message stack) of a special template depending on entity age for the &quot;Private Message&quot; module, my Drupal 8 site uses the &quot;Message&quot; module (https://www.drupal.org/project/message) as substructure.
I would like to build a kind of notification center into the page, which should be possible to implement with the message stack (as I heard).
The trigger to generate such a message will probably be a custom module.
The message module also offers a kind of &quot;auto cleanup&quot;, but unfortunately as far as I have seen only for all messages and not per message template.
In principle I only want a notification center, which is triggered at certain events and which cleans itself depending on the message type (e.g. only the last 10 messages of a certain template or delete all messages of a certain template which are older than 10 days).
In general, I guess cleanup does not work, as it would probably also delete the &quot;private messages&quot;.
Any hints.
It's possible to override the cleanup/auto delete settings in the message template configuration (even via UI) per template. Just visit the template configuration form.