Checklist
Description
When working with messaging services, it is crucial that listeners have idempotent logic, which ensures that no operations will be duplicated if the service fails and tries to reprocess.
MTProto has a parameter where you can define an ID, which will ensure that the message is sent only once:
random_id long
"Unique client message ID required to prevent message resending"
https://core.telegram.org/method/messages.sendMessage
It exists in the raw functions, but the abstraction that wraps it doesn't have a parameter that we can pass to it:
Alternatively I am calling the raw function directly.
Checklist
Description
When working with messaging services, it is crucial that listeners have idempotent logic, which ensures that no operations will be duplicated if the service fails and tries to reprocess.
MTProto has a parameter where you can define an ID, which will ensure that the message is sent only once:
It exists in the raw functions, but the abstraction that wraps it doesn't have a parameter that we can pass to it:
Alternatively I am calling the raw function directly.