default first_item
to None or it doesn't exist when there's no toots
This commit is contained in:
parent
76ccbbbc46
commit
8bb20bcb17
1 changed files with 1 additions and 1 deletions
|
@ -117,13 +117,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
except ap_utils.FindActorException as e:
|
except ap_utils.FindActorException as e:
|
||||||
raise utils.EventError(str(e))
|
raise utils.EventError(str(e))
|
||||||
|
|
||||||
|
|
||||||
actor = ap_actor.Actor(actor_url)
|
actor = ap_actor.Actor(actor_url)
|
||||||
if not actor.load():
|
if not actor.load():
|
||||||
raise utils.EventError("Failed to load user")
|
raise utils.EventError("Failed to load user")
|
||||||
|
|
||||||
items = actor.outbox.load()
|
items = actor.outbox.load()
|
||||||
nonreply = [actor.followers]
|
nonreply = [actor.followers]
|
||||||
|
first_item = None
|
||||||
for item in items:
|
for item in items:
|
||||||
if item["type"] == "Announce" or item["object"]["cc"] == nonreply:
|
if item["type"] == "Announce" or item["object"]["cc"] == nonreply:
|
||||||
first_item = item
|
first_item = item
|
||||||
|
|
Loading…
Reference in a new issue