zelenin / go-tdlib Goto Github PK
View Code? Open in Web Editor NEWGo wrapper for TDLib (Telegram Database Library)
License: MIT License
Go wrapper for TDLib (Telegram Database Library)
License: MIT License
go version
go version go1.13.5 darwin/amd64
../../../../../go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:10:18: undefined: JsonClient
../../../../../go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:12:23: undefined: Response
../../../../../go/pkg/mod/github.com/zelenin/[email protected]/client/listener.go:50:16: undefined: Type
Hi there, FYI yesterday (04th February), around 21 GMT few accounts were blocked by Telegram.
Your account was suspended for suspicious activity. If you think that this is a mistake, please write to [email protected] your phone number and other details to recover the account.
It happens no matter what soft was doing, 2 app was just collection data, and 1 making custom feed to and sending to the private channel. And they were running on different servers.
It happens on the previous version, I'll try to recover the account and check again on latest TDLib 1.6.0
@zelenin, I created an issue to share the information, I don't think that something wrong in the code. As it was working fine before. Some go-clients even without updates, and yesterday in 1-hour all 3 were banned.
Hi.
I am using your project in my code as a dependency.
When I try to build my go application with the following command:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-extldflags "-static" -X app.Version=v2021.04.03-140818-a6a2828 -X app.CommitHash=a6a2828f0aeabdd0f70657c014c504eb36d8f983' -o ./release/console bitbucket.org/tlxco/my-test-telegram-client/console
I will get the following errors:
`
vendor/github.com/zelenin/go-tdlib/client/client.go:10:18: undefined: JsonClient
vendor/github.com/zelenin/go-tdlib/client/client.go:12:23: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/client.go:107:43: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/client.go:118:32: undefined: Request
vendor/github.com/zelenin/go-tdlib/client/client.go:118:43: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/listener.go:50:16: undefined: Type
vendor/github.com/zelenin/go-tdlib/client/type.go:1550:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:1571:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:17252:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:22766:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:22766:2: too many errors
make: *** [build_console] Error 2
`
What should I do to resolve this build problems which are fired from this repo?
Hi
As I saw in the documentation of Telegram TDLib library:
https://core.telegram.org/method/users.getFullUser
the getFullUser
method returns a UserFull
object which has a field named "user" and we can find the last seen status of desired user from that.
When calling GetUserFullInfo
method on your library, I figured out that the returning response struct of it, doesn't have a user field and also I went through the GetUserFullInfo
function and when I printed the marshalled response of the client, It also didn't have a "user" field.
What shall I do in order to find last seen status of a user? :🤔
Hi Everyone.
Recenlty, I'm working on this code to analyze my telegram account events.
with the following code that is mentioned in the Readme.md of this project:
for update := range listener.Updates { if update.GetClass() == client.ClassUpdate { log.Printf("%#v", update) if update.GetType() =="updateUser" { //updateStruct := update.(client.UpdateUserFullInfo) } } }
I want to now, for exmaple if "update type" is "updateUser" , what struct should I use to cast the "update" variable into.
Or if update mode is UserStatus change like this:
2021/02/04 13:16:37 &client.UpdateUserStatus{meta:client.meta{Type:"", Extra:""}, UserId:1***2632, Status:(*client.UserStatusOffline)(0xc00020a060)}
What struct shall I use to cast the "update" into for being able to work with it's values, print them and so on in a more convenient way
Please provide ViewMessages working example, to read message one by one from chat.
I try get some info about group but, i can't because occurred error shown in the title, can i fix it?
req := &client.GetBasicGroupRequest{BasicGroupId: -1001032883247}
me, err := tdlibClient.GetBasicGroup(req)
log.Printf("Me: %s %s [%s]", me.MemberCount)
I would like to use go-tdlib for a standard Telegram bot as a moderation tool, in a supergroup.
Is there a way to modify user's Banned rights, assuming the bot admin?
proxy := client.WithProxy(&client.AddProxyRequest{ Server: "ip", Port: myport, Enable: true, Type: &client.ProxyTypeHttp{ }, }) tdlibClient, err := client.NewClient(authorizer, logVerbosity, proxy)
(My proxy work without auth)
But when i run my code, i get this error
[ 1][t 0][1594069996.231744528][ClientJson.cpp:76][&status.is_error()] Failed to parse [request:{\0042@extra\0042:\004252fdfc07-2182-454f-963f-5f0f9a621d72\0042,\0042@type\0042:\0042addProxy\0042,\0042enable\0042:true,\0042port\0042:24000,\0042server\0042:\0042*IP here*\0042,\0042type\0042:{\0042@type\0042:\0042proxyTypeHttp\0042,\0042@extra\0042:\0042\0042,\0042username\0042:\0042\0042,\0042password\0042:\0042\0042,\0042http_only\0042:false}}] [Error : 0 : Unknown class]
what i do wrong?
Hi everyone
I tried to iterate over csv of my phone contacts (500 to 1000) and generate this struct:
importContactsReq := client.ImportContactsRequest{
Contacts: contactsToBeImported,
}
but when I call tdlibClient.ImportContacts(importContactsReq)
method, I receive this error:
error: 429 Too Many Requests: retry after 3600
Although I haven't sent many requests to telegram server, I got this error!
At first I tried inserting 500 contacts and received the error, then I tried to add 100 contacts on another account and got that error again!
There isn't any way to insert batch of contacts (0 to 1000) in a single request?
because when I call the tdlibClient.ImportContacts method on every phone number that I have in my contact list, very soon I will get blocked :( even If i put a 1 minute delay between my requests :'(
Is there anyway to do this without these strange limits!? or your TDLib client can't add contacts just the way as Telegram client on mobile do (I have 1000 contacts on my phone and when I create new account and tick the "Sync Contacts" checkbox, It'll be done in a few seconds!)?
I should say that when I created the app Id and api hash_id on my telegram panel, I set the mode on "Desktop" one, can this cause this type of very tight limits?
Hi, I'm having a few issues in order to set the log stream to "empty", using the SetLogStream() method with LogStreamEmpty, could you please provide an example?
Thank you in advance.
Hi,
I need to use telegram database API for automatization purposes, so I installed WSL2 and Ubuntu 20 on my windows PC and then compiled the tdlib package using instructions from TDLib themselves. I installed it in the $HOME/go/src/telegram.org directory, which I created just for this purpose. Then I did go get github.com/zelenin/go-tdlib
, pasted example code from README to main.go (in another directory), and did go build
.
It resulted in
imobulus@IMOBULUS-LAP:~/go/testing$ go build
# github.com/zelenin/go-tdlib/client
../src/github.com/zelenin/go-tdlib/client/tdlib.go:5:10: fatal error: td/telegram/td_json_client.h: No such file or directory
5 | #include <td/telegram/td_json_client.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
After some research i found out that this file is located in .../tdlib/include/td/telegram
, so i copied the whole td
folder in there. Next go build
looked like this
imobulus@IMOBULUS-LAP:~/go/testing$ go build
# github.com/zelenin/go-tdlib/client
/usr/bin/ld: cannot find -ltdjson_static
/usr/bin/ld: cannot find -ltdjson_private
/usr/bin/ld: cannot find -ltdclient
/usr/bin/ld: cannot find -ltdcore
/usr/bin/ld: cannot find -ltdactor
/usr/bin/ld: cannot find -ltddb
/usr/bin/ld: cannot find -ltdsqlite
/usr/bin/ld: cannot find -ltdnet
/usr/bin/ld: cannot find -ltdutils
collect2: error: ld returned 1 exit status
I haven't been able to fix this issue so far.
P.S. I tried using tdlib with python wrapper. It worked like a charm, so tdlib is installed correctly.
I'm using Ubuntu 16.04 and use instruction for installing library on Ubuntu.
When I want to build the provided example I got the following errors:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdsqlite.a(sqlite3.c.o): In function `sqlcipher_openssl_hmac':
sqlite3.c:(.text.sqlcipher_openssl_hmac+0x38): undefined reference to `HMAC_CTX_new'
sqlite3.c:(.text.sqlcipher_openssl_hmac+0x96): undefined reference to `HMAC_CTX_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdsqlite.a(sqlite3.c.o): In function `sqlcipher_openssl_activate':
sqlite3.c:(.text.sqlcipher_openssl_activate+0xa4): undefined reference to `OPENSSL_init_crypto'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdsqlite.a(sqlite3.c.o): In function `sqlcipher_openssl_ctx_init':
sqlite3.c:(.text.sqlcipher_openssl_ctx_init+0xbc): undefined reference to `OPENSSL_init_crypto'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdclient.a(Client.cpp.o): In function `std::thread::_State_impl<std::thread::_Invoker<std::tuple<td::detail::ThreadStl::ThreadStl<td::Client::Impl::init()::{lambda()#1}>(td::Client::Impl::init()::{lambda()#1}&&)::{lambda()#1}> > >::~_State_impl()':
Client.cpp:(.text._ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_6Client4Impl4initEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED0Ev[_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_6Client4Impl4initEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED5Ev]+0x38): undefined reference to `std::thread::_State::~_State()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdclient.a(Client.cpp.o): In function `std::thread::_State_impl<std::thread::_Invoker<std::tuple<td::detail::ThreadStl::ThreadStl<td::Client::Impl::init()::{lambda()#1}>(td::Client::Impl::init()::{lambda()#1}&&)::{lambda()#1}> > >::~_State_impl()':
Client.cpp:(.text._ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_6Client4Impl4initEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED2Ev[_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_6Client4Impl4initEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED5Ev]+0x3a): undefined reference to `std::thread::_State::~_State()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdclient.a(Client.cpp.o): In function `td::Client::Client()':
Client.cpp:(.text._ZN2td6ClientC2Ev+0x406): undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdcore.a(crypto.cpp.o): In function `td::RSA::from_pem(td::Slice)':
crypto.cpp:(.text._ZN2td3RSA8from_pemENS_5SliceE+0x6d0): undefined reference to `RSA_get0_key'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdactor.a(ConcurrentScheduler.cpp.o): In function `std::thread::_State_impl<std::thread::_Invoker<std::tuple<td::detail::ThreadStl::ThreadStl<td::ConcurrentScheduler::start()::{lambda()#1}>(td::ConcurrentScheduler::start()::{lambda()#1}&&)::{lambda()#1}> > >::~_State_impl()':
ConcurrentScheduler.cpp:(.text._ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_19ConcurrentScheduler5startEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED2Ev+0x10): undefined reference to `std::thread::_State::~_State()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdactor.a(ConcurrentScheduler.cpp.o): In function `std::thread::_State_impl<std::thread::_Invoker<std::tuple<td::detail::ThreadStl::ThreadStl<td::ConcurrentScheduler::start()::{lambda()#1}>(td::ConcurrentScheduler::start()::{lambda()#1}&&)::{lambda()#1}> > >::~_State_impl()':
ConcurrentScheduler.cpp:(.text._ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN2td6detail9ThreadStlC4IZNS3_19ConcurrentScheduler5startEvEUlvE_JEEEOT_DpOT0_EUlvE_EEEEED0Ev+0x17): undefined reference to `std::thread::_State::~_State()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdactor.a(ConcurrentScheduler.cpp.o): In function `td::ConcurrentScheduler::start()':
ConcurrentScheduler.cpp:(.text._ZN2td19ConcurrentScheduler5startEv+0x11f): undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::detail::(anonymous namespace)::strm_create(bio_st*)':
SslStream.cpp:(.text._ZN2td6detail12_GLOBAL__N_111strm_createEP6bio_st[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0xa): undefined reference to `BIO_set_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::LambdaGuard<td::detail::SslStreamImpl::init(td::CSlice, td::CSlice, td::SslStream::VerifyPeer)::{lambda()#3}>::~LambdaGuard()':
SslStream.cpp:(.text._ZN2td11LambdaGuardIZNS_6detail13SslStreamImpl4initENS_6CSliceES3_NS_9SslStream10VerifyPeerEEUlvE1_ED2Ev[_ZN2td11LambdaGuardIZNS_6detail13SslStreamImpl4initENS_6CSliceES3_NS_9SslStream10VerifyPeerEEUlvE1_ED5Ev]+0x35): undefined reference to `SSL_is_init_finished'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::LambdaGuard<td::detail::SslStreamImpl::init(td::CSlice, td::CSlice, td::SslStream::VerifyPeer)::{lambda()#3}>::~LambdaGuard()':
SslStream.cpp:(.text._ZN2td11LambdaGuardIZNS_6detail13SslStreamImpl4initENS_6CSliceES3_NS_9SslStream10VerifyPeerEEUlvE1_ED0Ev[_ZN2td11LambdaGuardIZNS_6detail13SslStreamImpl4initENS_6CSliceES3_NS_9SslStream10VerifyPeerEEUlvE1_ED5Ev]+0x3b): undefined reference to `SSL_is_init_finished'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::detail::SslStreamImpl::init(td::CSlice, td::CSlice, td::SslStream::VerifyPeer)':
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x7e): undefined reference to `TLS_client_method'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0xa8): undefined reference to `SSL_CTX_set_options'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x37d): undefined reference to `OPENSSL_init_ssl'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x451): undefined reference to `BIO_set_data'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x635): undefined reference to `BIO_get_new_index'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x643): undefined reference to `BIO_meth_new'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x659): undefined reference to `BIO_meth_set_write'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x66f): undefined reference to `BIO_meth_set_read'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x685): undefined reference to `BIO_meth_set_create'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x69b): undefined reference to `BIO_meth_set_destroy'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x6b1): undefined reference to `BIO_meth_set_ctrl'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::detail::SslStreamImpl::~SslStreamImpl()':
SslStream.cpp:(.text._ZN2td6detail13SslStreamImplD2Ev[_ZN2td6detail13SslStreamImplD5Ev]+0x50): undefined reference to `SSL_is_init_finished'
SslStream.cpp:(.text._ZN2td6detail13SslStreamImplD2Ev[_ZN2td6detail13SslStreamImplD5Ev]+0x1ca): undefined reference to `SSL_is_init_finished'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::detail::(anonymous namespace)::strm_read(bio_st*, char*, int)':
SslStream.cpp:(.text._ZN2td6detail12_GLOBAL__N_19strm_readEP6bio_stPci[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x30): undefined reference to `BIO_get_data'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdnet.a(SslStream.cpp.o): In function `td::detail::(anonymous namespace)::strm_write(bio_st*, char const*, int)':
SslStream.cpp:(.text._ZN2td6detail12_GLOBAL__N_110strm_writeEP6bio_stPKci[_ZN2td6detail13SslStreamImpl4initENS_6CSliceES2_NS_9SslStream10VerifyPeerE]+0x2d): undefined reference to `BIO_get_data'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdutils.a(BigNum.cpp.o): In function `td::BigNum::ensure_const_time()':
BigNum.cpp:(.text._ZN2td6BigNum17ensure_const_timeEv+0x11): undefined reference to `BN_set_flags'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libtdutils.a(crypto.cpp.o): In function `td::init_crypto()':
crypto.cpp:(.text._ZN2td11init_cryptoEv+0xc9): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
When calling GetChatMessageByDate
and the rest Message related functions, they work properly, but the tag is wrong on the views count, so the Views
field always equals to 0.
Proofs:
Here's the screenshot from DLV session:
(dlv) config max-string-len 1024
(dlv) config max-array-values 1024
(dlv) c
Authorization Ready! Let's rock
> github.com/Arman92/go-tdlib.(*Client).GetChatMessageByDate() /Users/rustam/go/pkg/mod/github.com/!arman92/[email protected]/methods.go:1462 (hits goroutine(1):1 total:1) (PC: 0x4130cf9)
1457:
1458: if result.Data["@type"].(string) == "error" {
1459: return nil, fmt.Errorf("error! code: %d msg: %s", result.Data["code"], result.Data["message"])
1460: }
1461:
=>1462: var message Message
1463: err = json.Unmarshal(result.Raw, &message)
1464: return &message, err
1465:
1466: }
1467:
(dlv) p string(result.Raw)
"{\"@type\":\"message\",\"id\":1971322880,\"sender\":{\"@type\":\"messageSenderChat\",\"chat_id\":-1001213537108},\"chat_id\":-1001213537108,\"is_outgoing\":false,\"is_pinned\":false,\"can_be_edited\":false,\"can_be_forwarded\":true,\"can_be_deleted_only_for_self\":false,\"can_be_deleted_for_all_users\":false,\"can_get_statistics\":false,\"can_get_message_thread\":false,\"is_channel_post\":true,\"contains_unread_mention\":false,\"date\":1594790344,\"edit_date\":0,\"interaction_info\":{\"@type\":\"messageInteractionInfo\",\"view_count\":9,\"forward_count\":0},\"reply_in_chat_id\":0,\"reply_to_message_id\":0,\"message_thread_id\":0,\"ttl\":0,\"ttl_expires_in\":0.000000,\"via_bot_user_id\":0,\"author_signature\":\"\",\"media_album_id\":\"0\",\"restriction_reason\":\"\",\"content\":{\"@type\":\"messageText\",\"text\":{\"@type\":\"formattedText\",\"text\":\"Press check to check if you're a member of this chat\",\"entities\":[]}},\"reply_markup\":{\"@type\":\"replyMarkupInlineKeyboard\",\"rows\":[[{\"@type\":\"inlineKeyboardButton\",\"text\":\"Check\",\"type\":{\"@type\":\"inlineKeyboardButtonTypeCallback\",\"data\":\"DGNoZWNrZXI="
(dlv)
Message is unmarshaled from json:
(dlv) n
> github.com/Arman92/go-tdlib.(*Client).GetChatMessageByDate() /Users/rustam/go/pkg/mod/github.com/!arman92/[email protected]/methods.go:1464 (PC: 0x4130dbf)
1459: return nil, fmt.Errorf("error! code: %d msg: %s", result.Data["code"], result.Data["message"])
1460: }
1461:
1462: var message Message
1463: err = json.Unmarshal(result.Raw, &message)
=>1464: return &message, err
1465:
1466: }
1467:
1468: // GetChatMessageCount Returns approximate number of messages of the specified type in the chat
1469: // @param chatID Identifier of the chat in which to count messages
(dlv) p message.Views
0
While source json contains the value \"view_count\":9
(also, see above in dlv screenshot).
I will submit the PR shortly.
hi
i want build package for windows.I build tdlib based on this URLto get directory /src/
├── bin
│ └── tdjson.dll
├── include
│ └── td
│ ├── telegram
│ │ ├── Client.h
│ │ ├── Log.h
│ │ ├── td_api.h
│ │ ├── td_api.hpp
│ │ ├── td_json_client.h
│ │ ├── td_log.h
│ │ └── tdjson_export.h
│ └── tl
│ └── TlObject.h
└── lib
├── cmake
│ └── Td
│ ├── TdConfig.cmake
│ ├── TdConfigVersion.cmake
│ ├── TdTargets-release.cmake
│ └── TdTargets.cmake
├── tdactor.lib
├── tdapi.lib
├── tdclient.lib
├── tdcore.lib
├── tddb.lib
├── tdjson.lib
├── tdjson_private.lib
├── tdjson_static.lib
├── tdnet.lib
├── tdsqlite.lib
└── tdutils.lib
how setting cgo LDFLAGS?
original:
//#cgo windows CFLAGS: -IC:/src/td -IC:/src/td/build
//#cgo windows LDFLAGS: -LC:/src/td/build/Debug -ltdjson
i set:
//#cgo windows CFLAGS: -IC:/src/include
//#cgo windows LDFLAGS: -LC:/src/lib -tdactor -tdapi -tdclient -tdcore -tddb - tdjson -tdjson_private -tdjson_static -tdnet -tdsqlite -tdutils
Unfortunately it cannot be used!
chat, err := client.SearchPublicChat(&tdlib.SearchPublicChatRequest{Username: "@chrtnv"})
// err = json: cannot unmarshal object into Go struct field .last_message of type client.MessageSender
plz update to actual tdlib with getMessageThread support
Hi
I'm working on this library to test and automate some of Telegram features for myself. Therefore, I logged into another phone number which I had by using this library and added my real phone number as a contact to it.
The first time I fetched my phone number's Telegram profile, everything seemed to be OK.
The second time, somethings were wrong. For example, the last seen stamp (Was online) was about 1 hour ago while my phone Telegram account was online at that moment.Moreover, OnlineStatus of my fetched profile was offline while my phone was online. I checked my phone from another phone which I had a real Telegram app on and everything was ok.
I think that GetUser
method and GetUserFullInfo
methods have some sort of cache because what I said.
Is there any method to disable and remove these caches? and be able to see profile of someone as it is in a real Telegram app without any lag?
how i use UpdateMessageSendSucceeded to find correct id and can edit that message ?
after update to 0.3.1
if reflect.TypeOf(update) == reflect.TypeOf(&tdlib.UpdateNewMessage{}) {
update.(*tdlib.UpdateNewMessage).Message.Sender //always nil
}
whats wrong?
formattedText, err := tdlibClient.ParseTextEntities(&client.ParseTextEntitiesRequest{
Text: "*bold* _italic_ `code`",
ParseMode: &client.TextParseModeMarkdown{
Version: 2,
},
})
if err != nil {
log.Print(err)
}
Hi, how can I transform the output of
msg, ie := tdlibClient.GetMessage(&client.GetMessageRequest{ChatId:captainId, MessageId:i.Id })
fmt.Println(msg.Content)
Into the text message of the msg variable? This is the output I receive:
&{{messageText } 0xc000424000 }
Thank you so much for any assistance you'd provide.
How can I for example react to new messages that are forwarded?
tdlibClient, err := client.NewClient(authorizer, WithLogs())
if err != nil {
log.Fatalf("NewClient error: %s", err)
} else {
log.Println("Ready !")
}
listener := tdlibClient.GetListener()
defer listener.Close()
for update := range listener.Updates {
if update.GetType() == client.TypeUpdateNewMessage {
// ???
}
}
Hi,
I was trying to get a share link from the upcoming message. I know the share link format is https://t.me/{supergroup_username}
. I can get the chat by message. But I don’t know how to get supergroup from chat. Would you show me how to do it?
for update := range listener.Updates {
if update.GetClass() != tdlib.ClassUpdate {
continue
}
if update.GetType() != tdlib.TypeUpdateNewMessage {
continue
}
msg := update.(*client.UpdateNewMessage).Message
chat, err := client.GetChat(&tdlib.GetChatRequest{ChatId: msg.ChatId})
// TODO: get supergroup from chat
}
Hi, I'm using Linux and I'm trying to compile a standalone app to send to another Linux machine without tdlib installed.
Every time I try to run the compiled executable I get a few different errors:
/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found
Any idea on how I could solve this issue? I don't know if it is related to the lib itself, but I searched online and they suggest that it could be a cross compiling issue, but actually my two machines are running the same OS, both 64 bit, so I don't know what to think. Any ideas?
Thanks in advance!
I need to use this method
messages.getDialogs
but not find it in the library
any suggestion?
os: ubuntu:20.04
build command:
export CXXFLAGS=""
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
sudo cmake --build . --target install -j
...
cd ${PROJECT_DIR}
go build
error msg:
/usr/bin/ld: AuthManager.cpp:(.text._ZN2td11AuthManager12update_stateENS0_5StateEbb+0x36b): undefined reference to `vtable for td::td_api::updateAuthorizationState'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::ClosureEvent<td::DelayedClosure<td::Td, void (td::Td::*)(td::tl::unique_ptr<td::td_api::Update>&&), td::tl::unique_ptr<td::td_api::updateNewInlineCallbackQuery>&&> >::~ClosureEvent()':
CallbackQueriesManager.cpp:(.text._ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_28updateNewInlineCallbackQueryEEEEEEED2Ev[_ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_28updateNewInlineCallbackQueryEEEEEEED5Ev]+0x28): undefined reference to `vtable for td::td_api::updateNewInlineCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::ClosureEvent<td::DelayedClosure<td::Td, void (td::Td::*)(td::tl::unique_ptr<td::td_api::Update>&&), td::tl::unique_ptr<td::td_api::updateNewInlineCallbackQuery>&&> >::~ClosureEvent()':
CallbackQueriesManager.cpp:(.text._ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_28updateNewInlineCallbackQueryEEEEEEED0Ev[_ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_28updateNewInlineCallbackQueryEEEEEEED5Ev]+0x29): undefined reference to `vtable for td::td_api::updateNewInlineCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::ClosureEvent<td::DelayedClosure<td::Td, void (td::Td::*)(td::tl::unique_ptr<td::td_api::Update>&&), td::tl::unique_ptr<td::td_api::updateNewCallbackQuery>&&> >::~ClosureEvent()':
CallbackQueriesManager.cpp:(.text._ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_22updateNewCallbackQueryEEEEEEED2Ev[_ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_22updateNewCallbackQueryEEEEEEED5Ev]+0x28): undefined reference to `vtable for td::td_api::updateNewCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::ClosureEvent<td::DelayedClosure<td::Td, void (td::Td::*)(td::tl::unique_ptr<td::td_api::Update>&&), td::tl::unique_ptr<td::td_api::updateNewCallbackQuery>&&> >::~ClosureEvent()':
CallbackQueriesManager.cpp:(.text._ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_22updateNewCallbackQueryEEEEEEED0Ev[_ZN2td12ClosureEventINS_14DelayedClosureINS_2TdEMS2_FvONS_2tl10unique_ptrINS_6td_api6UpdateEEEEJONS4_INS5_22updateNewCallbackQueryEEEEEEED5Ev]+0x29): undefined reference to `vtable for td::td_api::updateNewCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::CallbackQueriesManager::get_query_payload(int, td::BufferSlice&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager17get_query_payloadEiONS_11BufferSliceEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x65): undefined reference to `td::td_api::callbackQueryPayloadGame::callbackQueryPayloadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager17get_query_payloadEiONS_11BufferSliceEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xfc): undefined reference to `td::td_api::callbackQueryPayloadData::callbackQueryPayloadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::CallbackQueriesManager::get_callback_query_answer_object(long)':
CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager32get_callback_query_answer_objectEl+0x11d): undefined reference to `td::td_api::callbackQueryAnswer::callbackQueryAnswer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::CallbackQueriesManager::on_new_query(int, long, td::UserId, td::DialogId, td::MessageId, td::BufferSlice&&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager12on_new_queryEilNS_6UserIdENS_8DialogIdENS_9MessageIdEONS_11BufferSliceElONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x14c): undefined reference to `td::td_api::updateNewCallbackQuery::updateNewCallbackQuery(long, int, long, long, long, td::tl::unique_ptr<td::td_api::CallbackQueryPayload>&&)'
/usr/bin/ld: CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager12on_new_queryEilNS_6UserIdENS_8DialogIdENS_9MessageIdEONS_11BufferSliceElONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2fd): undefined reference to `vtable for td::td_api::updateNewCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(CallbackQueriesManager.cpp.o): in function `td::CallbackQueriesManager::on_new_inline_query(int, long, td::UserId, td::tl::unique_ptr<td::telegram_api::inputBotInlineMessageID>&&, td::BufferSlice&&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager19on_new_inline_queryEilNS_6UserIdEONS_2tl10unique_ptrINS_12telegram_api23inputBotInlineMessageIDEEEONS_11BufferSliceElONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x10a): undefined reference to `td::td_api::updateNewInlineCallbackQuery::updateNewInlineCallbackQuery(long, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, td::tl::unique_ptr<td::td_api::CallbackQueryPayload>&&)'
/usr/bin/ld: CallbackQueriesManager.cpp:(.text._ZN2td22CallbackQueriesManager19on_new_inline_queryEilNS_6UserIdEONS_2tl10unique_ptrINS_12telegram_api23inputBotInlineMessageIDEEEONS_11BufferSliceElONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x216): undefined reference to `vtable for td::td_api::updateNewInlineCallbackQuery'
/usr/bin/ld: /usr/local/lib/libtdcore.a(DialogFilter.cpp.o): in function `td::DialogFilter::get_chat_filter_info_object() const':
DialogFilter.cpp:(.text._ZNK2td12DialogFilter27get_chat_filter_info_objectEv+0x54): undefined reference to `td::td_api::chatFilterInfo::chatFilterInfo(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/local/lib/libtdcore.a(Logging.cpp.o): in function `td::Logging::set_current_stream(td::tl::unique_ptr<td::td_api::LogStream>)':
Logging.cpp:(.text._ZN2td7Logging18set_current_streamENS_2tl10unique_ptrINS_6td_api9LogStreamEEE+0x276): undefined reference to `vtable for td::td_api::logStreamFile'
/usr/bin/ld: /usr/local/lib/libtdcore.a(Logging.cpp.o): in function `td::Logging::get_current_stream()':
Logging.cpp:(.text._ZN2td7Logging18get_current_streamEv+0x170): undefined reference to `td::td_api::logStreamFile::logStreamFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long)'
/usr/bin/ld: Logging.cpp:(.text._ZN2td7Logging18get_current_streamEv+0x1f9): undefined reference to `td::td_api::logStreamDefault::logStreamDefault()'
/usr/bin/ld: Logging.cpp:(.text._ZN2td7Logging18get_current_streamEv+0x221): undefined reference to `td::td_api::logStreamEmpty::logStreamEmpty()'
/usr/bin/ld: /usr/local/lib/libtdcore.a(NotificationType.cpp.o): in function `td::NotificationTypeSecretChat::get_notification_type_object(td::DialogId) const':
NotificationType.cpp:(.text._ZNK2td26NotificationTypeSecretChat28get_notification_type_objectENS_8DialogIdE[_ZNK2td26NotificationTypeSecretChat28get_notification_type_objectENS_8DialogIdE]+0x1f): undefined reference to `td::td_api::notificationTypeNewSecretChat::notificationTypeNewSecretChat()'
/usr/bin/ld: /usr/local/lib/libtdcore.a(NotificationType.cpp.o): in function `td::NotificationTypeCall::get_notification_type_object(td::DialogId) const':
NotificationType.cpp:(.text._ZNK2td20NotificationTypeCall28get_notification_type_objectENS_8DialogIdE[_ZNK2td20NotificationTypeCall28get_notification_type_objectENS_8DialogIdE]+0x2c): undefined reference to `td::td_api::notificationTypeNewCall::notificationTypeNewCall(int)'
/usr/bin/ld: /usr/local/lib/libtdcore.a(NotificationType.cpp.o): in function `td::NotificationTypeMessage::get_notification_type_object(td::DialogId) const':
NotificationType.cpp:(.text._ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE[_ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE]+0xca): undefined reference to `td::td_api::notificationTypeNewMessage::notificationTypeNewMessage(td::tl::unique_ptr<td::td_api::message>&&)'
/usr/bin/ld: NotificationType.cpp:(.text._ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE[_ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE]+0xe5): undefined reference to `vtable for td::td_api::message'
/usr/bin/ld: NotificationType.cpp:(.text._ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE[_ZNK2td23NotificationTypeMessage28get_notification_type_objectENS_8DialogIdE]+0x152): undefined reference to `vtable for td::td_api::messageForwardInfo'
/usr/bin/ld: /usr/local/lib/libtdcore.a(NotificationType.cpp.o): in function `td::NotificationTypePushMessage::get_push_message_content_object(td::Slice, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, td::Photo const&, td::Document const&)':
NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xaf): undefined reference to `td::td_api::pushMessageContentHidden::pushMessageContentHidden(bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x150): undefined reference to `td::td_api::pushMessageContentMediaAlbum::pushMessageContentMediaAlbum(int, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x279): undefined reference to `td::td_api::pushMessageContentMediaAlbum::pushMessageContentMediaAlbum(int, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x4ee): undefined reference to `td::td_api::pushMessageContentSticker::pushMessageContentSticker(td::tl::unique_ptr<td::td_api::sticker>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x508): undefined reference to `vtable for td::td_api::sticker'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x525): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x53c): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x585): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x5ce): undefined reference to `vtable for td::td_api::thumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x5e9): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x601): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x665): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x6d3): undefined reference to `vtable for td::td_api::maskPosition'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x799): undefined reference to `td::td_api::pushMessageContentPoll::pushMessageContentPoll(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x810): undefined reference to `td::td_api::pushMessageContentPoll::pushMessageContentPoll(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x87f): undefined reference to `td::td_api::pushMessageContentLocation::pushMessageContentLocation(bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x8f5): undefined reference to `td::td_api::pushMessageContentInvoice::pushMessageContentInvoice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x9a3): undefined reference to `td::td_api::pushMessageContentGameScore::pushMessageContentGameScore(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xa62): undefined reference to `td::td_api::pushMessageContentMessageForwards::pushMessageContentMessageForwards(int)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xbd7): undefined reference to `td::td_api::pushMessageContentDocument::pushMessageContentDocument(td::tl::unique_ptr<td::td_api::document>&&, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xbf1): undefined reference to `vtable for td::td_api::document'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xc0e): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xc26): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xc6e): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xcb6): undefined reference to `vtable for td::td_api::thumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xcd2): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xce9): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xd31): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xd91): undefined reference to `vtable for td::td_api::minithumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xe6b): undefined reference to `td::td_api::pushMessageContentChatDeleteMember::pushMessageContentChatDeleteMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0xeaf): undefined reference to `td::td_api::pushMessageContentBasicGroupChatCreate::pushMessageContentBasicGroupChatCreate()'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1035): undefined reference to `td::td_api::pushMessageContentAudio::pushMessageContentAudio(td::tl::unique_ptr<td::td_api::audio>&&, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x104f): undefined reference to `vtable for td::td_api::audio'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x106f): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1087): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x10cf): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x111a): undefined reference to `vtable for td::td_api::thumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1136): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x114d): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1195): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x11f8): undefined reference to `vtable for td::td_api::minithumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x148b): undefined reference to `td::td_api::pushMessageContentAnimation::pushMessageContentAnimation(td::tl::unique_ptr<td::td_api::animation>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x14a5): undefined reference to `vtable for td::td_api::animation'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x14c2): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x14da): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1522): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x156a): undefined reference to `vtable for td::td_api::thumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1586): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x159d): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x15e5): undefined reference to `vtable for td::td_api::localFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1645): undefined reference to `vtable for td::td_api::minithumbnail'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1700): undefined reference to `td::td_api::pushMessageContentChatAddMembers::pushMessageContentChatAddMembers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1893): undefined reference to `td::td_api::pushMessageContentPhoto::pushMessageContentPhoto(td::tl::unique_ptr<td::td_api::photo>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x18ad): undefined reference to `vtable for td::td_api::photo'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x18df): undefined reference to `vtable for td::td_api::photoSize'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x18fc): undefined reference to `vtable for td::td_api::file'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x1917): undefined reference to `vtable for td::td_api::remoteFile'
/usr/bin/ld: NotificationType.cpp:(.text._ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE[_ZN2td27NotificationTypePushMessage31get_push_message_content_objectENS_5SliceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5PhotoERKNS_8DocumentE]+0x19a5): undefined reference to `vtable for td::td_api::localFile'
Sometimes the client.Close()
API call does not complete in time and returns the "response catching timeout". As a fallback, I just close the listener when the timeout has happened, so new updates won't be handled. However, the receive()
goroutine does not gracefully handle this, even though it's supposed to, and occasionally panics:
panic: send on closed channel
goroutine 15 [running]:
github.com/zelenin/go-tdlib/client.(*Client).receive(0xc00007ea00)
/opt/gone/pkg/mod/github.com/zelenin/[email protected]/client/client.go:98 +0x19a
created by github.com/zelenin/go-tdlib/client.NewClient
/opt/gone/pkg/mod/github.com/zelenin/[email protected]/client/client.go:69 +0x198
The code that causes the panic is:
for _, listener := range client.listenerStore.Listeners() {
if listener.IsActive() {
listener.Updates <- typ
} else {
needGc = true
}
}
The IsActive()
and Close()
calls themselves are protected with locks, so the isActive
flag theoretically shouldn't be set when the listener.Updates
channel is closed already. But it's still possible that the Close()
call happens between the IsActive()
check and the channel write operation. So a more robust mechanism is needed.
I propose a following pattern:
func (listener *Listener) Transaction(callback func()) bool {
listener.mu.Lock()
defer listener.mu.Unlock()
if listener.isActive {
callback()
return true
}
return false
}
if !listener.Transaction(func() {
listener.Updates <- typ
}) {
needsGc = true
}
This way, the channel is guaranteed to remain open.
I have complete all step in this guide , after build done on Windows, I don't know what todo next ?
I have copy folder tdlib\include\td
to C:\Users\admin\go\pkg\mod\github.com\zelenin\[email protected]\client
and got some error when run this command in project folder go get .
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b057\_x002.o: in function `_cgo_06df6fcfe585_Cfunc_td_create_client_id':
/tmp/go-build/cgo-gcc-prolog:64: undefined reference to `__imp_td_create_client_id'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b057\_x002.o: in function `_cgo_06df6fcfe585_Cfunc_td_execute':
/tmp/go-build/cgo-gcc-prolog:82: undefined reference to `__imp_td_execute'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b057\_x002.o: in function `_cgo_06df6fcfe585_Cfunc_td_receive':
/tmp/go-build/cgo-gcc-prolog:100: undefined reference to `__imp_td_receive'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b057\_x002.o: in function `_cgo_06df6fcfe585_Cfunc_td_send':
/tmp/go-build/cgo-gcc-prolog:117: undefined reference to `__imp_td_send'
collect2.exe: error: ld returned 1 exit status
Hi.
I am using your project in my code as a dependency.
When I try to build my go application with the following command:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-extldflags "-static" -X app.Version=v2021.04.03-140818-a6a2828 -X app.CommitHash=a6a2828f0aeabdd0f70657c014c504eb36d8f983' -o ./release/console bitbucket.org/tlxco/my-test-telegram-client/console
I will get the following errors:
`
github.com/zelenin/go-tdlib/client
vendor/github.com/zelenin/go-tdlib/client/client.go:10:18: undefined: JsonClient
vendor/github.com/zelenin/go-tdlib/client/client.go:12:23: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/client.go:107:43: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/client.go:118:32: undefined: Request
vendor/github.com/zelenin/go-tdlib/client/client.go:118:43: undefined: Response
vendor/github.com/zelenin/go-tdlib/client/listener.go:50:16: undefined: Type
vendor/github.com/zelenin/go-tdlib/client/type.go:1550:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:1571:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:17252:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:22766:2: undefined: meta
vendor/github.com/zelenin/go-tdlib/client/type.go:22766:2: too many errors
make: *** [build_console] Error 2
`
What should I do to resolve this build problems which are fired from this repo?
I have a group where contains 456 members, but i can get only 200 users, is there the to get they all, for example set offset parameter like in python in function get_chat_members from pyrogram"?
In python i can use function "get_chat_members" in "pyrogram" ans set offset parameter
I'm using that function "SearchChatMembers" in my code
SendMessage() with ReplyToMessageId work fine, but EditMessageText() / EditMessageCaption() raise error: "5 Message not found"
// fine
dsc, err := tdlibClient.SendMessage(&client.SendMessageRequest{
ChatId: dscChatId,
InputMessageContent: &client.InputMessageText{
Text: formattedText,
DisableWebPagePreview: true,
ClearDraft: true,
},
ReplyToMessageId: getMessageId(srcChatId, srcId, dscChatId),
})
// error
dsc, err := tdlibClient.EditMessageText(&client.EditMessageTextRequest{
ChatId: dscChatId,
MessageId: getMessageId(srcChatId, srcId, dscChatId),
InputMessageContent: &client.InputMessageText{
Text: formattedText,
DisableWebPagePreview: true,
ClearDraft: true,
},
})
// error
dsc, err := tdlibClient.EditMessageCaption(&client.EditMessageCaptionRequest{
ChatId: dscChatId,
MessageId: getMessageId(srcChatId, srcId, dscChatId),
Caption: formattedText,
})
Please help me!
Is there way to create clients for multiple users (not one as in example) and save them to an arbitrary database?
userreq := &client.GetUserRequest{UserId: message.SenderUserId}
user, err := tdlibClient.GetUser(userreq)
err
sometimes comes back with "response catching timeout", I've checked message.SenderUserId
and it's always valid and a user, it's not my connection or anything between me and Telegram as far as I can tell. Using tdlib 1.5.0
I'm using this code:
authorizer := client.ClientAuthorizer()
go client.CliInteractor(authorizer)
authorizer.TdlibParameters <- &client.TdlibParameters{
UseTestDc: false,
DatabaseDirectory: filepath.Join(".tdlib", "database"),
FilesDirectory: filepath.Join(".tdlib", "files"),
UseFileDatabase: true,
UseChatInfoDatabase: true,
UseMessageDatabase: true,
UseSecretChats: false,
ApiId: apiId,
ApiHash: apiHash,
SystemLanguageCode: "en",
DeviceModel: "Server",
SystemVersion: "1.0.0",
ApplicationVersion: "1.0.0",
EnableStorageOptimizer: true,
IgnoreFileNames: false,
}
tdlibClient, err := client.NewClient(authorizer)
if err != nil {
log.Fatalf("NewClient error: %s", err)
}
and I got an error "NewClient error: Phone number can't be empty"
Any idea how to solve it?
Hello. I think you have already seen this issue Race condition in the new multi client design #1242.
TLDR: Since 1.7.0 receiving updates must be safe (mutually exclusive) between different threads.
I use go-tdlib and see that this is a compex task to pass some shared mutex between threads tree, hence I have questions to you:
Please, could you provide SendMessage (TypeMessageText) example.
Is this lib support send a message encrypted? This API - https://core.telegram.org/method/messages.sendEncrypted
how to add time out for TDLib download file method in sync mode?
There is a class inputMessageInvoice In documentation (https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_message_invoice.html) If I try to use it as @type value then get "Failed to parse JSON object as TDLib request: Unknown class "inputMessageInvoice""
error. Can you please explain how to use this class with this bindings?
Hello!
I try to decrease verbosity level for logging (make it 0, like in example), but I get this error:
[ 1][t 0][1588620837.870815516][ClientJson.cpp:90] Failed to parse [request:{\0042@extra\0042:\0042\0042,\0042@type\0042:\0042setLogVerbosityLevel\0042,\0042new_verbosity_level\0042:0}] [Error : 0 : Unknown class]
This is how I make corresponding request:
tdlibClient, err = client.NewClient(stateHandler, logVerbosity)
_, err = tdlibClient.SetLogVerbosityLevel(&client.SetLogVerbosityLevelRequest{NewVerbosityLevel: 0})
Same error using client.WithLogVerbosity
from example.
My env:
go-tdlib v0.2.0
tdlib from this image https://hub.docker.com/r/mihaildemidoff/tdlib-go
// Handle Ctrl+C
ch := make(chan os.Signal, 2)
signal.Notify(ch, os.Interrupt, syscall.SIGTERM)
go func() {
<-ch
tdlibClient.Stop()
os.Exit(1)
}()
Workaround:
Solution by @levlam
"Receive is called after Client destroy" is always a bug of those, who uses TDLib. You should move call to client.DestroyInstance() to the thread, which calls receive, instead of testing your luck with Sleep.
You can also use new JSON interface (td_create_client_id/td_send/td_receive), which removes possibility to do this bug.
Please add support for td_create_client_id, td_send, td_receive, td_execute
https://core.telegram.org/tdlib/docs/td__json__client_8h.html
Can you give me an example of how to add a MTPtoto proxy and ping it without authorization? I was able to do this after authorization.
thanks.
Hello. I have dockerized simple project (from readme example code) and received the following errors
Step 14/17 : RUN go build -o main .
---> Running in f039cae50692
# github.com/zelenin/go-tdlib/client
/go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:10:18: undefined: JsonClient
/go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:12:23: undefined: Response
/go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:107:43: undefined: Response
/go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:118:32: undefined: Request
/go/pkg/mod/github.com/zelenin/[email protected]/client/client.go:118:43: undefined: Response
/go/pkg/mod/github.com/zelenin/[email protected]/client/listener.go:50:16: undefined: Type
/go/pkg/mod/github.com/zelenin/[email protected]/client/type.go:1397:2: undefined: meta
/go/pkg/mod/github.com/zelenin/[email protected]/client/type.go:1418:2: undefined: meta
/go/pkg/mod/github.com/zelenin/[email protected]/client/type.go:15238:2: undefined: meta
/go/pkg/mod/github.com/zelenin/[email protected]/client/type.go:20658:2: undefined: meta
/go/pkg/mod/github.com/zelenin/[email protected]/client/type.go:20658:2: too many errors
Import in main.go
import (
"fmt"
"log"
"math"
"path/filepath"
"strconv"
"github.com/zelenin/go-tdlib/client"
)
My Dockerfile
################ build tdlib ################
FROM alpine:3.9 as builder
RUN apk add --no-cache --update \
alpine-sdk \
linux-headers \
git \
zlib-dev \
openssl-dev \
gperf \
cmake \
php \
php-ctype
ENV LANG en_US.utf8
RUN git clone https://github.com/tdlib/td.git \
&& cd td \
&& rm -rf build \
&& mkdir build \
&& cd build \
&& export CXXFLAGS="" \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. \
&& cmake --build . --target prepare_cross_compiling \
&& cd .. \
&& php SplitSource.php \
&& cd build \
&& cmake --build . --target install \
&& cd .. \
&& php SplitSource.php --undo \
&& cd .. \
&& ls -l /usr/local
#############################################
FROM golang:alpine
# copy tdlib from builder
COPY --from=builder /usr/local/lib/libtd* /usr/local/lib/
# Set necessary environmet variables needed for our image
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64
# Move to working directory /build
WORKDIR /build
# Copy and download dependency using go mod
COPY go.mod .
COPY go.sum .
RUN go mod download -json
# Copy the code into the container
COPY . .
# tmp
RUN ls -la /go/pkg/mod/github.com/zelenin/[email protected]/client
# Build the application
RUN go build -o main .
# Move to /dist directory as the place for resulting binary folder
WORKDIR /dist
# Copy binary from build to main folder
RUN cp /build/main .
# Command to run when starting the container
CMD ["/dist/main"]
ls -la /go/pkg/mod/github.com/zelenin/[email protected]/client
total 1316
dr-xr-xr-x 3 root root 4096 Jun 21 16:29 .
dr-x------ 7 root root 4096 Jun 21 16:29 ..
-r--r--r-- 1 root root 5687 Jun 21 16:29 authorization.go
-r--r--r-- 1 root root 3036 Jun 21 16:29 client.go
-r--r--r-- 1 root root 372 Jun 21 16:29 extra.go
-r--r--r-- 1 root root 291356 Jun 21 16:29 function.go
-r--r--r-- 1 root root 1082 Jun 21 16:29 listener.go
dr-xr-xr-x 2 root root 4096 Jun 21 16:29 puller
-r--r--r-- 1 root root 295 Jun 21 16:29 tdjson.go
-r--r--r-- 1 root root 327 Jun 21 16:29 tdjson_dynamic.go
-r--r--r-- 1 root root 284 Jun 21 16:29 tdjson_static.go
-r--r--r-- 1 root root 3661 Jun 21 16:29 tdlib.go
-r--r--r-- 1 root root 723261 Jun 21 16:29 type.go
-r--r--r-- 1 root root 275363 Jun 21 16:29 unmarshaler.go
Without docker everything works fine. What is the problem?
this library it's confusing when using it at first, just looking at the code I could understand.
When running the code you need to authenticate with your phone number, the code(whic is asynchronous) ask you for you phone number as seen here authorization.go#L132 , but in the console there is too much noise from other logs that someone who didn't read the code can't understand what to do next, look:
So it would great if when asking the phone number, this code should be synchronous so the printed part "Enter phone number: " could be vissible and don't get lost in the whole logs.
Please update to 1.7.4 for Payments 2.0
Show an example of how to get data as text using updateNewMessage as an example.
for update := range listener.Updates {
if update.GetClass() == client.ClassUpdate {
if update.GetType() == "updateNewMessage" {
????
Hi
I have 2 phone numbers, from one of them , I exported all of my contacts with their telegram IDs.
In my other phone number by which I created a brand-new Telegram account, when I want to iterate over csv of my contact's telegramIDs and add them one by one by their Telegram IDs via addContact method, I get these errors:
3 User not found
and some times
6 User not found
It's weird to me because these telegram IDs are real and I've exported them from my contacts on my other Telegram account.
What's the meaning of These errors and what should I do?
@zelenin It would be great for me If you help me.
Hi.
I've tried to open sqlite database of tdlib in sqlite DB Browser (https://sqlitebrowser.org/dl/)
the app asks me for encryption password or encryption Raw key of the database.
Where can I find such a key?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.