Here is try of description what We are trying to solve:
We have support team of 4 members , all of them has set notification lever “Watching fist post” for support category. We want to seeped up support team by pushing them to watch and react on notification more often and more quickly. Since team members has different work hours lot of topics get open and solved during team member off work hours.
I am support member and my shift starts at until that there is lot of topics opened
and solved while I am off. I do not want to get notification for that kind of topic.
So we are looking for way to dismiss (“de notify”, revoke , automatically read ) notification which is triggered by Watching Firs Post and has been solved before user came to discourse.
So far we fund notification like that in db using query like this
select notifications.user_id ,notifications.topic_id ,notifications.id from notifications where read=false and notification_type=17 and topic_id in ( select topic_id from topic_custom_fields where name='accepted_answer_post_id' and value is not null )
We did manage to dismiss notification by updating read field through db
update notifications set read=true where id=XXXXXX
We know that doing db updates directly on discourse is insane and very bad.
So we are looking for some kind of API that will allow us to call dismiss of specific notification ?
If we manage to make sidekiq job for dismissing notification through db directly will be that sustainable solution for production site.
Are there any “good” plugins that doing background jobs over db so we can try to recreate one whit this tasks ?
We are more likely to delete notifications like this, since there is no Notifications - "unread only" filter
Does discourse has any “official” plugin that doing deletes inside db so we can try to learn how to delete something in db through plugin.