zelenin/go-tdlib

how to set @extra

chenyu1990 opened this issue · 3 comments

Maybe there is something wrong with my expression. I use translator.
When requesting a .ForwardMessages, the response returned immediately is not the final result.
The event listened to in .GetListener is the final result.
.Send cannot associate .GetListener with .ForwardMessages.
Can I maintain extra myself?

When requesting a .ForwardMessages, the response returned immediately is not the final result.

the response is not returned synchronously. Under the hood, ForwardMessages method uses Send method, which sets Extra to request, and then catches response and returns it as a ForwardMessages response. So the library is already doing what you want to achieve

https://github.com/zelenin/go-tdlib/blob/master/client/client.go#L119