mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-22 08:13:33 +01:00
revert changes
This commit is contained in:
parent
3e2ff1e22d
commit
0e78076359
@ -174,7 +174,6 @@ USERS_NOTIFICATIONS = {
|
|||||||
"MEDIA_ADDED": True, # in use
|
"MEDIA_ADDED": True, # in use
|
||||||
"MEDIA_ENCODED": False, # not implemented
|
"MEDIA_ENCODED": False, # not implemented
|
||||||
"MEDIA_REPORTED": True, # in use
|
"MEDIA_REPORTED": True, # in use
|
||||||
"COMMENT_ADDED": True, # in use
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ADMINS_NOTIFICATIONS = {
|
ADMINS_NOTIFICATIONS = {
|
||||||
|
@ -204,15 +204,6 @@ URL: %s
|
|||||||
d["to"] = [media.user.email]
|
d["to"] = [media.user.email]
|
||||||
notify_items.append(d)
|
notify_items.append(d)
|
||||||
|
|
||||||
if action == "comment_added" and media:
|
|
||||||
if settings.USERS_NOTIFICATIONS.get("COMMENT_ADDED", False):
|
|
||||||
d = {}
|
|
||||||
title = f"[{settings.PORTAL_NAME}] - Comment was added"
|
|
||||||
msg = f"A comment was added on media {media_url}\n"
|
|
||||||
d["title"] = title
|
|
||||||
d["msg"] = msg
|
|
||||||
d["to"] = [media.user.username]
|
|
||||||
notify_items.append(d)
|
|
||||||
|
|
||||||
for item in notify_items:
|
for item in notify_items:
|
||||||
email = EmailMessage(
|
email = EmailMessage(
|
||||||
|
@ -1713,10 +1713,3 @@ def encoding_file_delete(sender, instance, **kwargs):
|
|||||||
# delete local chunks, and remote chunks + media file. Only when the
|
# delete local chunks, and remote chunks + media file. Only when the
|
||||||
# last encoding of a media is complete
|
# 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"
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user