From a19d5a58653e8585e29a1bc1532b4017e55550cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 Oct 2021 14:06:52 +0100 Subject: [PATCH] Show Friendica timeline after search on handle --- webapp_profile.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 1f29a368d..8a4c188d9 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -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 += \