mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-28 19:23:33 +01:00
fix notification upon comments
This commit is contained in:
parent
969d8a0eac
commit
e6361cecb1
@ -173,7 +173,7 @@ Media becomes private if it gets reported %s times %s\n
|
|||||||
d = {}
|
d = {}
|
||||||
d["title"] = title
|
d["title"] = title
|
||||||
d["msg"] = msg
|
d["msg"] = msg
|
||||||
d["to"] = media.user.email
|
d["to"] = [media.user.email]
|
||||||
notify_items.append(d)
|
notify_items.append(d)
|
||||||
|
|
||||||
if action == "media_added" and media:
|
if action == "media_added" and media:
|
||||||
@ -211,7 +211,7 @@ URL: %s
|
|||||||
msg = f"A comment was added on media {media_url}\n"
|
msg = f"A comment was added on media {media_url}\n"
|
||||||
d["title"] = title
|
d["title"] = title
|
||||||
d["msg"] = msg
|
d["msg"] = msg
|
||||||
d["to"] = media.user.username
|
d["to"] = [media.user.username]
|
||||||
notify_items.append(d)
|
notify_items.append(d)
|
||||||
|
|
||||||
for item in notify_items:
|
for item in notify_items:
|
||||||
|
@ -1112,7 +1112,7 @@ class CommentDetail(APIView):
|
|||||||
Delete comment (DELETE)
|
Delete comment (DELETE)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
permission_classes = (permissions.IsAuthenticatedOrReadOnly, IsUserOrEditor)
|
permission_classes = (IsAuthorizedToAdd,)
|
||||||
parser_classes = (JSONParser, MultiPartParser, FormParser, FileUploadParser)
|
parser_classes = (JSONParser, MultiPartParser, FormParser, FileUploadParser)
|
||||||
|
|
||||||
def get_object(self, friendly_token):
|
def get_object(self, friendly_token):
|
||||||
|
Loading…
Reference in New Issue
Block a user