cannot use current_user in celery task

This commit is contained in:
rimu 2024-06-14 16:42:32 +08:00
parent c9fa9a9748
commit be0544a372

View file

@ -273,7 +273,7 @@ def send_community_follow(community_id, join_request_id, user_id):
user = User.query.get(user_id) user = User.query.get(user_id)
community = Community.query.get(community_id) community = Community.query.get(community_id)
follow = { follow = {
"actor": current_user.public_url(), "actor": user.public_url(),
"to": [community.public_url()], "to": [community.public_url()],
"object": community.public_url(), "object": community.public_url(),
"type": "Follow", "type": "Follow",