fix: recover stale IM member credentials
This commit is contained in:
@@ -381,3 +381,11 @@ func IsConflict(err error) bool {
|
||||
var target *Error
|
||||
return errors.As(err, &target) && target.Status == http.StatusConflict
|
||||
}
|
||||
|
||||
// IsAuthenticationFailed reports whether the IM server rejected user
|
||||
// credentials. Callers may use this to repair credentials which have drifted
|
||||
// from the local encrypted copy, while leaving transport failures untouched.
|
||||
func IsAuthenticationFailed(err error) bool {
|
||||
var target *Error
|
||||
return errors.As(err, &target) && target.Status == http.StatusUnauthorized
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user