diff options
| -rw-r--r-- | hello-fusepy.py | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/hello-fusepy.py b/hello-fusepy.py index 1db302b..175c9a3 100644 --- a/hello-fusepy.py +++ b/hello-fusepy.py @@ -82,6 +82,7 @@ class ActivityPubStatusProvider(StatusProvider):                  None,              ) +        # consider reposts for getting max_id...          ss = [              Status(                  s["object"]["id"].split("/")[-1], @@ -92,9 +93,9 @@ class ActivityPubStatusProvider(StatusProvider):              if s.get("type", None) == "Create"              and "object" in s              and all(key in s["object"] for key in ["id", "content", "published"]) -            and len(s["object"]["content"])          ] -        return ss, ss[-1].id +        # ... but don't return it +        return [s for s in ss if len(s.content)], ss[-1].id  class MastodonStatusProvider(StatusProvider): @@ -137,6 +138,7 @@ class MastodonStatusProvider(StatusProvider):              logging.error("Request error: %s", e)              return self._fallback_error(getattr(e, "message", str(e))), None          statuses = res.json() +        # consider reposts for getting max_id...          ss = [              Status(                  s["id"], @@ -145,9 +147,9 @@ class MastodonStatusProvider(StatusProvider):              )              for s in statuses              if all(key in s for key in ["id", "content", "created_at"]) -            and len(s["content"])          ] -        return ss, ss[-1].id +        # ... but don't return it +        return [s for s in ss if len(s.content)], ss[-1].id  class StatusFileSystem(Operations, LoggingMixIn):  | 
