forked from melod1n/fast-messenger
message sending status
This commit is contained in:
@@ -43,6 +43,12 @@ class ResponseConverterFactory(private val converter: JsonConverter) : Converter
|
||||
converter.fromJson(successType, string)
|
||||
}.fold(
|
||||
onSuccess = { successModel ->
|
||||
if (successModel is ApiResponse<*>) {
|
||||
if (successModel.error != null) {
|
||||
throw ApiException(successModel.error)
|
||||
}
|
||||
}
|
||||
|
||||
return successModel
|
||||
},
|
||||
onFailure = { failure ->
|
||||
|
||||
@@ -42,6 +42,8 @@ enum class VkErrorCode(val code: Int) {
|
||||
ACCESS_TO_DOC_DENIED(1153),
|
||||
|
||||
SOME_AUTH_ERROR(104),
|
||||
|
||||
CANNOT_SEND_MESSAGE_DUE_TO_PRIVACY_SETTINGS(902),
|
||||
ACCESS_TOKEN_EXPIRED(1117);
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user