Fix overly-verbose errors in message details
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
.module-message-detail__label {
|
.module-message-detail__label {
|
||||||
@include font-body-1-bold;
|
@include font-body-1-bold;
|
||||||
|
|
||||||
|
min-width: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-message-detail__unix-timestamp {
|
.module-message-detail__unix-timestamp {
|
||||||
|
@@ -1610,7 +1610,9 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
const promises: Array<Promise<unknown>> = [];
|
const promises: Array<Promise<unknown>> = [];
|
||||||
|
|
||||||
let errors: Array<CustomError>;
|
let errors: Array<CustomError>;
|
||||||
if (isCustomError(result.value)) {
|
if (result.value instanceof SendMessageProtoError && result.value.errors) {
|
||||||
|
({ errors } = result.value);
|
||||||
|
} else if (isCustomError(result.value)) {
|
||||||
errors = [result.value];
|
errors = [result.value];
|
||||||
} else if (Array.isArray(result.value.errors)) {
|
} else if (Array.isArray(result.value.errors)) {
|
||||||
({ errors } = result.value);
|
({ errors } = result.value);
|
||||||
|
Reference in New Issue
Block a user