kopia lustrzana https://github.com/snarfed/bridgy-fed
activities UI bug fix for rendering profile updates
rodzic
378bb5dbf4
commit
e6889b4cf6
4
pages.py
4
pages.py
|
@ -230,6 +230,10 @@ def fetch_activities(query):
|
|||
obj_url = util.get_first(obj, 'url') or obj.get('id')
|
||||
if obj_url:
|
||||
obj_content = util.pretty_link(obj_url, text=obj_content)
|
||||
elif (activity.domain and
|
||||
a.get('id', '').strip('/') == f'https://{activity.domain[0]}'):
|
||||
activity.phrase = 'updated'
|
||||
a['content'] = 'their profile'
|
||||
|
||||
activity.content = a.get('content') or a.get('displayName')
|
||||
activity.url = util.get_first(a, 'url')
|
||||
|
|
|
@ -32,6 +32,7 @@ class PagesTest(testutil.TestCase):
|
|||
def add_activities():
|
||||
Activity(id='a', domain=['foo.com'], direction='in',
|
||||
source_as2=json_dumps(NOTE)).put()
|
||||
# profile update
|
||||
Activity(id='g', domain=['foo.com'], direction='out',
|
||||
source_mf2=json_dumps(ACTOR_MF2)).put()
|
||||
# different domain
|
||||
|
|
Ładowanie…
Reference in New Issue