From 0cf6dfd87b33bdd7694e1fd57bd514a493491e0b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 22 Aug 2019 13:56:33 +0100 Subject: [PATCH] Preferred name from within actor --- utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 58ef1a63..f7beb542 100644 --- a/utils.py +++ b/utils.py @@ -66,8 +66,9 @@ def getPreferredName(actor: str,personCache: {}) -> str: """ if not personCache.get(actor): return None - if personCache[actor].get('preferredUsername'): - return personCache[actor]['preferredUsername'] + if personCache[actor].get('actor'): + if personCache[actor]['actor'].get('preferredUsername'): + return personCache[actor]['actor']['preferredUsername'] return None def getNicknameFromActor(actor: str) -> str: