Comments (8)
If I change chat_id to any other chats, or change type to photo/file no behaviors either.
from td.
You can use only identifiers received from TDLib, therefore you must receive the chat_id
from TDLib before you can use it.
Additionally, you can check TDLib logs to see requests received by TDLib and their responses.
from td.
You can use only identifiers received from TDLib, therefore you must receive the
chat_id
from TDLib before you can use it.Additionally, you can check TDLib logs to see requests received by TDLib and their responses.
Thanks for the reply. From my side, I could see the identifiers in a 10 digits format, and I have handled the json event each time I send to myself on other clients.
For the TDLib, what level of logs should I use? level 2? I may have a try to redirect stdout to a file.
from td.
You need level 3 or bigger to see all requests in the log.
from td.
OK, I have do some tests on daemon thread.
time.sleep(3)
td_send({
# '@type': 'loadChats',
# 'limit': 1
'@type': 'getChat',
'chat_id': {19xxxxxxxxx}
})
time.sleep(3)
td_send({
"@type": "sendMessage",
"chat_id": 19xxxxxxxxx,
"input_message_content": {
"@type": "inputMessageText",
"text": {
"@type": "formattedText",
"text": "Hello, this is a test message."
}
}
})
The first one, loadChats and limit set to 1, I could send this message. But for the second, openChat or getChat, the log in severity 3 reports that Chat is not found with a 400 return. Why I got this thing? Just a little bit confusing.
from td.
A "Chat not found" error means that you are trying to pass a hardcoded chat identifier to TDLib. You can only use identifiers received from the same TDLIb instance programmatically.
from td.
I'm sorry that I may not get you. I just wanna send something to 'Saved Message' by TdLib. How could I manage this before sent sendMessage to target chat_id: 19xxxxxxxxx? What function should I call for receiving the chat_id?
from td.
You need to use getMe
to get the current user, then use createPrivateChat
with received user_id
to create the chat with self, and then use received chat identifier to send messages.
from td.
Related Issues (20)
- Delays in getting message updates from some specific channels HOT 5
- step stuck:Please enter phone number HOT 1
- Someone please help me HOT 3
- [ASK] getChat delayed HOT 5
- Chat not found 400 HOT 10
- Question: Can this lib work with microcontrollers? HOT 2
- How many uploadFiles do we receive for already uploaded files? HOT 9
- Unsupported proxy link in tgx HOT 6
- An error occurred while building OpenSSL for Android HOT 5
- Why is 'upload_max_fileparts_premium' not being used? HOT 14
- Please guide me to read tdlib telegram's sqlite file, and convert it into telethon for use. Please ? HOT 3
- Trailing files cause pthreads unhandled exceptions to be triggered HOT 4
- Clear uploading files/unsent/pending messages queue on crash HOT 29
- add_update_handler not working for channels HOT 6
- basic group upgrade supergroup HOT 1
- Could you please remove the Airgram JS library from your docs. It doesn't support the lates TDLib version. HOT 1
- Please guide me to read tdlib telegram's sqlite file, and convert it into telethon for use. Please ? HOT 3
- Error occurred when building HOT 11
- I need TelegramX to extract auth key from the session, someone please help me HOT 2
- where is td_api.h located? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from td.