Add messageSendingStateFailed.need_another_sender.
This commit is contained in:
parent
5845917498
commit
6f835c12ee
@ -767,8 +767,10 @@ messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageRe
|
||||
messageSendingStatePending = MessageSendingState;
|
||||
|
||||
//@description The message failed to be sent @error_code An error code; 0 if unknown @error_message Error message
|
||||
//@can_retry True, if the message can be re-sent @retry_after Time left before the message can be re-sent, in seconds. No update is sent when this field changes
|
||||
messageSendingStateFailed error_code:int32 error_message:string can_retry:Bool retry_after:double = MessageSendingState;
|
||||
//@can_retry True, if the message can be re-sent
|
||||
//@need_another_sender True, if the message can be re-sent only on behalf of a different sender
|
||||
//@retry_after Time left before the message can be re-sent, in seconds. No update is sent when this field changes
|
||||
messageSendingStateFailed error_code:int32 error_message:string can_retry:Bool need_another_sender:Bool retry_after:double = MessageSendingState;
|
||||
|
||||
|
||||
//@description Describes a message
|
||||
|
@ -23456,8 +23456,10 @@ tl_object_ptr<td_api::MessageSendingState> MessagesManager::get_message_sending_
|
||||
return td_api::make_object<td_api::messageSendingStatePending>();
|
||||
}
|
||||
if (m->is_failed_to_send) {
|
||||
auto can_retry = can_resend_message(m);
|
||||
auto need_another_sender = can_retry && m->send_error_code == 400 && m->send_error_message == CSlice("SEND_AS_PEER_INVALID");
|
||||
return td_api::make_object<td_api::messageSendingStateFailed>(
|
||||
m->send_error_code, m->send_error_message, can_resend_message(m), max(m->try_resend_at - Time::now(), 0.0));
|
||||
m->send_error_code, m->send_error_message, can_retry, need_another_sender, max(m->try_resend_at - Time::now(), 0.0));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user