provide notifications on commenting

This commit is contained in:
Markos Gogoulos
2020-12-25 16:42:56 +02:00
parent 30ed940276
commit 969d8a0eac
3 changed files with 39 additions and 10 deletions

View File

@@ -1712,3 +1712,11 @@ def encoding_file_delete(sender, instance, **kwargs):
instance.media.post_encode_actions(encoding=instance, action="delete")
# delete local chunks, and remote chunks + media file. Only when the
# last encoding of a media is complete
@receiver(post_save, sender=Comment)
def comment_save(sender, instance, created, **kwargs):
if created:
notify_users(
friendly_token=instance.media.friendly_token, action="comment_added"
)