diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index 3b6523ae..fab4bb1a 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -564,7 +564,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): community.subscriptions_count += 1 db.session.commit() activity_log.result = 'success' - cache.delete_memoized(community_membership, user, community) + cache.delete_memoized('community_membership', user, community) elif request_json['type'] == 'Undo': if request_json['object']['type'] == 'Follow': # Unsubscribe from a community @@ -582,6 +582,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): if join_request: db.session.delete(join_request) db.session.commit() + cache.delete_memoized('community_membership', user, community) activity_log.result = 'success' elif request_json['object']['type'] == 'Like': # Undoing an upvote or downvote activity_log.activity_type = request_json['object']['type']