From 9f80891e1da3a1317182bfb528674428d1b5b225 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 7 Feb 2024 12:04:24 -0600 Subject: [PATCH] Fix: Open actions dialogue from followers and following buffers. Closes #575 --- doc/changelog.md | 5 +++++ src/controller/mastodon/handler.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/changelog.md b/doc/changelog.md index bb25d47b..1d9f0bfd 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -2,6 +2,11 @@ TWBlue Changelog ## changes in this version +* Mastodon: + * Fixed an error that caused TWBlue to be unable to properly display the user action dialog from the followers or following buffer. ([#575](https://github.com/mcv-software/twblue/issues/575)) + +## changes in version 2024.01.05 + * Core: * The TWBlue website will no longer be available on the twblue.es domain. Beginning in January 2024, TWBlue will live at https://twblue.mcvsoftware.com. Also, we will start releasing versions on [gitHub releases](https://github.com/mcv-software/twblue/releases) so it will be easier to track specific versions. * As of the first release of TWBlue in 2024, we will officially stop generating 32-bit (X86) compatible binaries due to the increasing difficulty of generating versions compatible with this architecture in modern Python. diff --git a/src/controller/mastodon/handler.py b/src/controller/mastodon/handler.py index 8ca3f614..753f2eba 100644 --- a/src/controller/mastodon/handler.py +++ b/src/controller/mastodon/handler.py @@ -151,7 +151,11 @@ class Handler(object): users.insert(0, status.reblog.account.acct) else: users = [user.acct for user in status.mentions if user.id != buffer.session.db["user_id"]] - if item.account.acct not in users: + if hasattr(item, "account"): + acct = item.account.acct + else: + acct = item.acct + if acct not in users: users.insert(0, item.account.acct) u = userActions.userActions(buffer.session, users)