show ,fedi latest-tweet also if it's a self-reply
This commit is contained in:
parent
f739064d10
commit
3f4eebf85b
2 changed files with 4 additions and 2 deletions
|
@ -110,9 +110,9 @@ class Module(ModuleManager.BaseModule):
|
|||
raise utils.EventError("Failed to find user")
|
||||
|
||||
items = actor.outbox.load()
|
||||
nonreply = [actor.followers]
|
||||
for item in items:
|
||||
if (item["type"] == "Announce" or
|
||||
item["object"].get("inReplyTo", None) == None):
|
||||
if item["type"] == "Announce" or item["object"]["cc"] == nonreply:
|
||||
first_item = item
|
||||
break
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ class Actor(object):
|
|||
self.username = None
|
||||
self.inbox = None
|
||||
self.outbox = None
|
||||
self.followers = None
|
||||
|
||||
def load(self):
|
||||
response = ap_utils.activity_request(self.url)
|
||||
|
@ -16,6 +17,7 @@ class Actor(object):
|
|||
self.username = response.data["preferredUsername"]
|
||||
self.inbox = Inbox(response.data["inbox"])
|
||||
self.outbox = Outbox(response.data["outbox"])
|
||||
self.followers = response.data["followers"]
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue