fix: 修正用户访问失败时的返回处理
This commit is contained in:
@@ -48,6 +48,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -307,6 +308,9 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
if (null == userDetailInfo) {
|
||||
return Single.error(new Exception(ResUtil.getString(R.string.xchat_android_core_user_usermodel_06)));
|
||||
}
|
||||
if (userDetailInfo.getCode() != 200) {
|
||||
return Single.error(new Exception(userDetailInfo.getMessage()));
|
||||
}
|
||||
return Single.just(userDetailInfo);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user