Skip to content
Snippets Groups Projects
Commit 9e17ecb0 authored by roadscape's avatar roadscape
Browse files

clean json md, fix log

parent bed8c081
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ def mentions(post): ...@@ -22,7 +22,7 @@ def mentions(post):
url = '@' + post['author'] + '/' + post['permlink'] url = '@' + post['author'] + '/' + post['permlink']
if d1: log.warning("%s detected - provided: %s", url, d1) if d1: log.warning("%s detected - provided: %s", url, d1)
if d2: log.warning("%s provided - detected: %s", url, d1) if d2: log.warning("%s provided - detected: %s", url, d2)
return detected & provided return detected & provided
...@@ -42,7 +42,7 @@ def _post_users(post): ...@@ -42,7 +42,7 @@ def _post_users(post):
pass pass
if 'users' in md and isinstance(md['users'], list): if 'users' in md and isinstance(md['users'], list):
return set(md['users']) return {user.strip('.@') for user in md['users'] if user and isinstance(user, str)}
return set() return set()
def post_basic(post): def post_basic(post):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment