remove live activity record when oauth revoked

This commit is contained in:
Andre Medeiros 2022-10-26 19:00:40 -04:00
parent f50d9f075e
commit cd8b0b0dca

View file

@ -187,6 +187,9 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) {
zap.String("reddit#access_token", rac.ObfuscatedAccessToken()), zap.String("reddit#access_token", rac.ObfuscatedAccessToken()),
zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()), zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()),
) )
if err == reddit.ErrOauthRevoked {
_ = lac.liveActivityRepo.Delete(lac, at)
}
return return
} }
@ -211,6 +214,9 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) {
zap.String("reddit#access_token", rac.ObfuscatedAccessToken()), zap.String("reddit#access_token", rac.ObfuscatedAccessToken()),
zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()), zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()),
) )
if err == reddit.ErrOauthRevoked {
_ = lac.liveActivityRepo.Delete(lac, at)
}
return return
} }