Added event type in context object for discussion events (#242)

This commit is contained in:
Frisk 2022-06-13 21:57:18 +02:00
parent df6f7d6c7e
commit 0513ec2422
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -121,6 +121,7 @@ def parse_discussion_post(post, comment_pages):
discussion_logger.error("Could not parse paths for article comment, here is the content of comment_pages: {}, ignoring...".format(comment_pages)) discussion_logger.error("Could not parse paths for article comment, here is the content of comment_pages: {}, ignoring...".format(comment_pages))
raise ArticleCommentError raise ArticleCommentError
event_type = f"discussion/{post_type.lower()}" event_type = f"discussion/{post_type.lower()}"
context.event = event_type
context.set_comment_page(comment_page) context.set_comment_page(comment_page)
run_hooks(pre_hooks, context, post) run_hooks(pre_hooks, context, post)
try: try: