diff --git a/slack_backup/reporters.py b/slack_backup/reporters.py index 77252dc..433b68a 100644 --- a/slack_backup/reporters.py +++ b/slack_backup/reporters.py @@ -225,12 +225,12 @@ class TextReporter(Reporter): """return data for file""" if msg.file.filepath: fpath = os.path.abspath(msg.file.filepath) + fpath = pathlib.PurePath(fpath).as_uri() else: fpath = 'does_not_exists' - return {'msg': self.url_pat.sub('(' + - pathlib.PurePath(fpath).as_uri() + - ') ' + msg.file.title, msg.text), + return {'msg': self.url_pat.sub('(' + fpath + ') ' + msg.file.title, + msg.text), 'nick': self._get_symbol('file')} def _msg(self, msg): @@ -381,16 +381,16 @@ class StaticHtmlReporter(Reporter): """return data for file""" if msg.file.filepath: fpath = os.path.abspath(msg.file.filepath) + fpath = pathlib.PurePath(fpath).as_uri() else: fpath = 'does_not_exists' _, ext = os.path.splitext(fpath) if ext.lower() in ('.png', '.jpg', '.jpeg', '.gif'): - url = ('' + msg.file.title + '') + url = ('' +
+                   msg.file.title + '') else: - url = ('' + msg.file.title + '') + url = ('' + msg.file.title + '') return {'msg': self.url_pat.sub(url, msg.text), 'nick': self._get_symbol('file')}