You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using ForwardMessages and CopyMessages and I noticed that if one of the message_ids is not delivered, the whole request returns 400 ok: false, failed to send message.
The test I have made:
I create a channel
I sent 5 messages in my channel with IDs 5, 6, 7, 8 ,9
I deleted message with ID 7
I sent forwardMessages with message_ids = [5, 6, 7, 8, 9]
I obtained ad answer
400, {'ok': False, 'error_code': 400, 'description': 'Bad Request: failed to send message #1 with the error message "Message was not forwarded"'}
Even if the messages 5,6,8,9 have been sent successfully, only message 7 has not.
I tried inserting an ID that does not exists in the channel (222222) with message_ids = [5, 6, 8, 9, 222222]
This time (message not existing at all, not deleted), the 222222 was simply skipped as said in docs "If some of the specified messages can't be found or forwarded, they are skipped".
At this point another issue opens, how should I map results with original message ids ?
In the case of [5, 6, 8, 9, 222222], the 222222 ID does not exists and it's skipped so the answer will be 1 element shorter than the original.
How should I know from that which message was skipped ?
I can no longer map with enumeration the results to the original message IDs since one of the elements has been skipped and I don't know which.
Please update the return schema, a good solution could be that it returns ok: false if every message has not been delivered.
Otherwise it returns a list of the messages including info about the message and original message.
{'ok': true, 'results': [{'ok': false, 'from_message_id': 7, 'description': 'message has not been sent...'}, {'ok': true, 'from_message_id': 8, ....}, ....]}
If it's not possibile to attach the original message id, at least do not skip results and return sorted by the IDs so that we can map it using enumerate.
The text was updated successfully, but these errors were encountered:
I was using ForwardMessages and CopyMessages and I noticed that if one of the message_ids is not delivered, the whole request returns 400 ok: false, failed to send message.
The test I have made:
I create a channel
I sent 5 messages in my channel with IDs 5, 6, 7, 8 ,9
I deleted message with ID 7
I sent forwardMessages with message_ids = [5, 6, 7, 8, 9]
I obtained ad answer
400, {'ok': False, 'error_code': 400, 'description': 'Bad Request: failed to send message #1 with the error message "Message was not forwarded"'}
Even if the messages 5,6,8,9 have been sent successfully, only message 7 has not.
I tried inserting an ID that does not exists in the channel (222222) with message_ids = [5, 6, 8, 9, 222222]
This time (message not existing at all, not deleted), the 222222 was simply skipped as said in docs "If some of the specified messages can't be found or forwarded, they are skipped".
At this point another issue opens, how should I map results with original message ids ?
In the case of [5, 6, 8, 9, 222222], the 222222 ID does not exists and it's skipped so the answer will be 1 element shorter than the original.
How should I know from that which message was skipped ?
I can no longer map with enumeration the results to the original message IDs since one of the elements has been skipped and I don't know which.
Please update the return schema, a good solution could be that it returns ok: false if every message has not been delivered.
Otherwise it returns a list of the messages including info about the message and original message.
{'ok': true, 'results': [{'ok': false, 'from_message_id': 7, 'description': 'message has not been sent...'}, {'ok': true, 'from_message_id': 8, ....}, ....]}
If it's not possibile to attach the original message id, at least do not skip results and return sorted by the IDs so that we can map it using enumerate.
The text was updated successfully, but these errors were encountered: