themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
25 stars 31 forks source link

`comment_on_publish` issues with deleting comments #599

Closed zorbathut closed 1 year ago

zorbathut commented 1 year ago

From https://github.com/themotte/rDrama/pull/596:

It's not possible to actually remove then approve a comment. Main issue is files.routes.admin.admin.api_unban_comment calling comment_on_publish, which tries to generate duplicate notifications, 500'ing out on a database integrity error. comment_on_publish is really designed to only be called once, so we need to have comment_on_unpublish delete notifications, or not call comment_on_publish on comment approval.