mirror of
https://git.phreedom.club/localhost_frssoft/FMN_bot.git
synced 2024-11-24 22:20:56 +01:00
Fix very strange error: get mentions includes other types
This commit is contained in:
parent
b5f2caf749
commit
2b91d414ca
|
@ -17,9 +17,9 @@ headers= {
|
||||||
def get_notifications():
|
def get_notifications():
|
||||||
params = {
|
params = {
|
||||||
"limit": 15,
|
"limit": 15,
|
||||||
"type": "mention"
|
"types": ["mention"]
|
||||||
}
|
}
|
||||||
r = requests.get(instance_point + "/notifications", params, headers=headers)
|
r = requests.get(instance_point + "/notifications", json=params, headers=headers)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ def get_control_mention():
|
||||||
|
|
||||||
notif = get_notifications()
|
notif = get_notifications()
|
||||||
for i in notif:
|
for i in notif:
|
||||||
|
if i['type'] != "mention":
|
||||||
|
continue
|
||||||
seen = i['pleroma']['is_seen']
|
seen = i['pleroma']['is_seen']
|
||||||
acct_mention = i['account']['acct']
|
acct_mention = i['account']['acct']
|
||||||
reply_to_id = i['status']['in_reply_to_id']
|
reply_to_id = i['status']['in_reply_to_id']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user