Send links when posting a topic comment

This commit is contained in:
Manuel Cortez 2019-06-06 13:42:22 -05:00
parent 8cdec543e1
commit 4e6126405f

View File

@ -115,11 +115,6 @@ class displayTopicPresenter(basePost.displayPostPresenter):
attachments = "" attachments = ""
if hasattr(comment, "attachments"): if hasattr(comment, "attachments"):
attachments = self.upload_attachments(comment.attachments) attachments = self.upload_attachments(comment.attachments)
urls = utils.find_urls_in_text(msg)
if len(urls) != 0:
if len(attachments) == 0: attachments = urls[0]
else: attachments += urls[0]
msg = msg.replace(urls[0], "")
if msg != "": if msg != "":
kwargs.update(message=msg) kwargs.update(message=msg)
if attachments != "": if attachments != "":