Show Friendica timeline after search on handle

merge-requests/30/head
Bob Mottram 2021-10-27 14:06:52 +01:00
parent aaa201ba9a
commit a19d5a5865
1 changed files with 19 additions and 4 deletions

View File

@ -283,16 +283,31 @@ def htmlProfileAfterSearch(cssCache: {},
if isCreateInsideAnnounce(item):
isAnnouncedFeedItem = True
item = item['object']
if not item.get('actor'):
continue
if not isAnnouncedFeedItem and item['actor'] != personUrl:
continue
if not item.get('type'):
continue
if item['type'] == 'Create':
if not hasObjectDict(item):
continue
if item['type'] != 'Create' and item['type'] != 'Announce':
if item['type'] != 'Note':
continue
if not item.get('to'):
continue
# wrap in create
cc = []
if item.get('cc'):
cc = item['cc']
newItem = {
'object': item,
'to': item['to'],
'cc': cc,
'actor': personUrl,
'type': 'Create'
}
item = newItem
if not item.get('actor'):
continue
if not isAnnouncedFeedItem and item['actor'] != personUrl:
continue
profileStr += \