how to set @extra
chenyu1990 opened this issue · 3 comments
I want to match the request and response in the GetListener
already implemented here
https://github.com/zelenin/go-tdlib/blob/master/client/client.go#L101
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