Skip to content

Commit

Permalink
fix: invalidate_inbox_cache fn call in reauthorized!
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra committed May 23, 2024
1 parent 2791267 commit 6974c90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/models/concerns/reauthorizable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def prompt_reauthorization!
mailer.automation_rule_disabled(self).deliver_later
end

update_cache_keys unless instance_of?(::AutomationRule)
invalidate_inbox_cache unless instance_of?(::AutomationRule)
end

def process_integration_hook_reauthorization_emails(mailer)
Expand All @@ -70,12 +70,13 @@ def process_integration_hook_reauthorization_emails(mailer)
def reauthorized!
::Redis::Alfred.delete(authorization_error_count_key)
::Redis::Alfred.delete(reauthorization_required_key)
update_cache_keys

invalidate_inbox_cache unless instance_of?(::AutomationRule)
end

private

def update_cache_keys
def invalidate_inbox_cache
inbox.update_account_cache if inbox.present?
end

Expand Down

0 comments on commit 6974c90

Please sign in to comment.