mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
membership cache flushing
This commit is contained in:
parent
5948650b3a
commit
7d2b6b8f6a
1 changed files with 2 additions and 1 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue