Merge pull request #230 from MineRobber9000/patch-1

Fix empty fediverse display names
This commit is contained in:
jesopo 2020-01-16 16:18:15 +00:00 committed by GitHub
commit 9b6a2ead46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ class Actor(object):
if response.code == 200: if response.code == 200:
response = response.json() response = response.json()
self.username = response["preferredUsername"] self.username = response["preferredUsername"]
self.display_name = response.get("name", self.username) self.display_name = response.get("name") or self.username
self.inbox = Inbox(response["inbox"]) self.inbox = Inbox(response["inbox"])
self.outbox = Outbox(response["outbox"]) self.outbox = Outbox(response["outbox"])
self.followers = response["followers"] self.followers = response["followers"]