Use original account information for reblogged statuses

Otherwise, we get the account name of reblogger in the timeline.
This commit is contained in:
Denis Laxalde 2019-09-09 10:33:25 +02:00 committed by Ivan Habunek
parent 2e3479c012
commit e06478a798
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,9 @@ class Status:
return Author(acct, data['account']['display_name'])
def get_account(self):
acct = self.data['account']['acct']
reblog = self.data.get("reblog")
account = reblog['account'] if reblog else self.data['account']
acct = account['acct']
return acct if "@" in acct else "{}@{}".format(acct, self.default_instance)
def __repr__(self):