Fixed a bug

This commit is contained in:
Frisk 2019-06-03 01:44:45 +02:00
parent 53d34ca84a
commit 09079afab7
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -621,7 +621,7 @@ def embed_formatter(action, change, parsed_comment, categories):
elif action == "curseprofile/comment-created":
if settings["appearance"]["embed"]["show_edit_changes"]:
comment_content = pull_comment(change["logparams"]["4:comment_id"])
if comment_content is not None and comment_content:
if comment_content is not None and comment_content["text"]:
embed["fields"] = [{"name": _("Comment content"), "value": comment_content["text"]}]
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
commentid=change["logparams"]["4:comment_id"])
@ -631,7 +631,7 @@ def embed_formatter(action, change, parsed_comment, categories):
elif action == "curseprofile/comment-replied":
if settings["appearance"]["embed"]["show_edit_changes"]:
comment_content = pull_comment(change["logparams"]["4:comment_id"])
if comment_content is not None and comment_content:
if comment_content is not None and comment_content["text"]:
embed["fields"] = [{"name": _("Comment content"), "value": comment_content["text"]}]
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
commentid=change["logparams"]["4:comment_id"])
@ -641,7 +641,7 @@ def embed_formatter(action, change, parsed_comment, categories):
elif action == "curseprofile/comment-edited":
if settings["appearance"]["embed"]["show_edit_changes"]:
comment_content = pull_comment(change["logparams"]["4:comment_id"])
if comment_content is not None and comment_content:
if comment_content is not None and comment_content["text"]:
embed["fields"] = [{"name": _("Comment content"), "value": comment_content["text"]}]
link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"],
commentid=change["logparams"]["4:comment_id"])