1
0
mirror of https://github.com/gryf/slack-backup.git synced 2025-12-17 11:30:25 +01:00

Added implementation for url_file_attachment option.

Using url_file_attachment user can specify if he like to change objects
like 'file_share' marked as external (in Slack servers point of view)
to attachments, so the only value would be remembered URL for the
"uploaded" document as an attachment. Or, treat it as is, and let the
slack-backup to produce file which contain the URLs and corresponding
local file names for such files.
This commit is contained in:
2018-07-16 08:33:43 +02:00
parent 71355b1c4a
commit db8527e9af
8 changed files with 490 additions and 25 deletions

View File

@@ -403,7 +403,7 @@ class StaticHtmlReporter(Reporter):
'nick': msg.user.name}
link = '<a href="{url}">{title}</a>'
attachement_msg = []
attachment_msg = []
if msg.attachments:
for att in msg.attachments:
@@ -429,9 +429,9 @@ class StaticHtmlReporter(Reporter):
link.format(**match))
else:
att_text = att.fallback
attachement_msg.append(att_text)
attachment_msg.append(att_text)
data['msg'] += '<br>'.join(attachement_msg)
data['msg'] += '<br>'.join(attachment_msg)
return data