[lore] Add permalink extraction for file objects
This commit is contained in:
parent
61c4af7d6d
commit
1f056c0cb5
1 changed files with 3 additions and 1 deletions
|
@ -178,5 +178,7 @@ def _scribe():
|
|||
def _extract_lore(obj):
|
||||
if obj['type'] == 'message':
|
||||
return obj['message']['permalink']
|
||||
elif obj['type'] == 'file':
|
||||
return obj['file']['permalink']
|
||||
# If nothing matches just return the object itself as a preformatted JSON object
|
||||
return '```\n' + obj + '\n```'
|
||||
return '```\n' + json.dumps(obj, indent=2) + '\n```'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue