def delete_notifications_for_user(self, user): PostCommentReplyNotification = get_post_comment_reply_notification_model( ) PostCommentReplyNotification.delete_post_comment_reply_notification( post_comment_id=self.pk, owner_id=user.pk) PostCommentNotification = get_post_comment_notification_model() PostCommentNotification.delete_post_comment_notification( post_comment_id=self.pk, owner_id=user.pk)
def delete_notifications(self): # Delete all post comment reply notifications PostCommentReplyNotification = get_post_comment_reply_notification_model() PostCommentReplyNotification.delete_post_comment_reply_notifications(post_comment_id=self.pk) # Delete all post comment user mention notifications PostCommentUserMentionNotification = get_post_comment_user_mention_notification_model() PostCommentUserMentionNotification.objects.filter( post_comment_user_mention__post_comment__post_id=self.pk).delete()
def delete_notifications(self): PostCommentReplyNotification = get_post_comment_reply_notification_model( ) PostCommentReplyNotification.delete_post_comment_reply_notifications( post_comment_id=self.pk)