mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Only notify for unauthorized response to messages endpoint.
This commit is contained in:
committed by
Greyson Parrelli
parent
0fd8f73cca
commit
d70fe8f2cd
@@ -1,22 +0,0 @@
|
||||
package org.thoughtcrime.securesms.net
|
||||
|
||||
import android.content.Context
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Response
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
|
||||
class UnregisteredInterceptor(val context: Context) : Interceptor {
|
||||
|
||||
override fun intercept(chain: Interceptor.Chain): Response {
|
||||
val response = chain.proceed(chain.request())
|
||||
if (response.code() == 403) {
|
||||
TextSecurePreferences.setUnauthorizedReceived(context, true)
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TAG = Log.tag(UnregisteredInterceptor::class.java)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user