fix: follow messages
parent
7a2493cf29
commit
8b73c81e51
|
@ -45,9 +45,12 @@ class Inbox(Resource):
|
||||||
self.args = self.post_parser.parse_args()
|
self.args = self.post_parser.parse_args()
|
||||||
json_payload = request.get_json()
|
json_payload = request.get_json()
|
||||||
actor = json_payload["actor"]
|
actor = json_payload["actor"]
|
||||||
|
if json_payload.get("Type") == "Follow":
|
||||||
|
logger.info(f"Fediseer is now followed from: {actor}")
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
message = json_payload["object"]["content"]
|
message = json_payload["object"]["content"]
|
||||||
|
logger.info(f"Fediseer Inbox Received: From: {actor} | {message}")
|
||||||
except:
|
except:
|
||||||
logger.info(f"Received unexpected invox payload: {json_payload}")
|
logger.info(f"Received unexpected invox payload: {json_payload}")
|
||||||
logger.info(f"Fediseer Inbox Received: From: {actor} | {message}")
|
|
||||||
return {"message": "delivered"}, 200
|
return {"message": "delivered"}, 200
|
||||||
|
|
Loading…
Reference in New Issue