mirror of https://gitlab.com/bashrc2/epicyon
Sequence
parent
0a3e50ad3b
commit
99ed86566d
4
utils.py
4
utils.py
|
@ -64,10 +64,10 @@ def urlPermitted(url: str, federationList: [],capability: str):
|
|||
def getPreferredName(actor: str,personCache: {}) -> str:
|
||||
"""Returns the preferred name for the given actor
|
||||
"""
|
||||
if not personCache.get(actor):
|
||||
return None
|
||||
if '/statuses/' in actor:
|
||||
actor=actor.split('/statuses/')[0]
|
||||
if not personCache.get(actor):
|
||||
return None
|
||||
if personCache[actor].get('actor'):
|
||||
if personCache[actor]['actor'].get('preferredUsername'):
|
||||
return personCache[actor]['actor']['preferredUsername']
|
||||
|
|
Loading…
Reference in New Issue