Open Mashi-91 opened 4 months ago
All outgoing messages need some time to be send and have state messageSendingStatePending
until that.
You can send full TDLib log with verbosity 4 since app launch to https://t.me/tdlib_bot if the message isn't sent for a long time.
can i just sent log file? But text msg just go fine
Log contains private data, so it must not be sent publicly.
i just send full log to bot. now wht?
Here's the thing text msg just going fine. others goes in pending. Why's that?
Here take a look at this. this wht i am getting when loading chats this when i upload file. only caption get not file and also nothing in telegram app. even though i deleted all msg.
flutter: β π‘ { flutter: β π‘ "text": "-u-t-s- 1715854240315 e-n-d- 531090172 --lbl--", flutter: β π‘ "entities": [], flutter: β π‘ "@type": "formattedText" flutter: β π‘ } flutter: βββββββ
Showing this is_uploading_completed true like 50 times and then show nothing. Then show another log
flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
flutter: β #0 HomeScreen.build.
Then show this log
[ 4][t 5][1715855954.160365104][MultiTimeout.cpp:84][#1][!PendingSendDialogActionTimeout] Set timeout of PendingSendDialogActionTimeout in 0.063011 [ 3][t 5][1715855954.160404443][MessagesManager.cpp:31111][#1][!MessagesManager] Receive send_chat_action timeout in chat 774194172 [ 4][t 5][1715855954.160410404][MultiTimeout.cpp:38][#1][!MessagesManager] Add PendingSendDialogActionTimeout for 774194172 in 4.000000 [ 3][t 5][1715855954.160417318][MessagesManager.cpp:31902][#1][!MessagesManager] Search for yet unsent message 7573.1 in chat 774194172 found 000002065CDA0AC0 [ 3][t 5][1715855954.160425424][MessagesManager.cpp:31164][#1][!MessagesManager] Send ChatActionUploadingDocumentAction in chat 774194172 [ 3][t 5][1715855954.160429716][DialogActionManager.cpp:316][#1][!MessagesManager] Skip unneeded ChatActionUploadingDocumentAction in chat 774194172
You don't process updateFileGenerationStart
and hence the being generated file blocks message queue.
updateFileGenerationStart
as documented.why showing this
First solve after login restart the app
how i logout completely?
By calling logOut
and waiting for authorizationStateClosed
.
That is how i do it bro. Then i got the error.
Which is expected because you have logged out.
But it is supposed to login instead of showing unauthorised error even though i was login with new phone number.
No. A TDLib instance can't be reused. You must create a new instance for new authorization.
Web showing Unimplementation Error. Can you tell how i can add web one?
There is no "Unimplementation" error in TDLib.
On this package i am using there's no implementation of web
TDLib supports Web using WebAssembly: https://github.com/tdlib/td/tree/master/example/web, so it can be used from there. You can check https://github.com/tdlib/td/blob/master/example/web/tdweb/README.md for description of TDLib usage from Web.
i dont know bro how i do it can guide me?
All available information on the usage is written in the example README.
I am getting only one message why's that?
which is Latest one but i want all of them.. and run again the function getting all the messages.
final tda.User user = await TelegramClient().client!.send(tda.GetMe());
when i first login then call this function and after that call getChatHistory function show this error chatNotFound until i verify the device from telegram app..
// Send the message await client!.send( tda.SendMessage( chatId: id, messageThreadId: 0, // Specify the message thread ID if applicable inputMessageContent: inputMessageContent, ), );
GetMe()
returns a user. You must use CreatePrivateChat
to create a private chat with a user.
But i am not creating any chat i am getting saved chats. And its works after i verify the device on my telegram app with the same code.
You need a chat to send a message. You don't have one after calling getMe
, because it returns a user
, but not a chat
.
is there any way to create a folder or is there any field in tdlib, i can use for creating folder like somekind of list?
A chat folder can be created using the method createChatFolder
.
is there any field where i can store ids like its not use or like users can't use the field Its Must Be List
You can store some data using setOption starting with "X", or using "setChatClientData".
but i want to store like list
Then, serialize it.
i just create lots of folder ids using SetOptions. how i get them all? cauze GetOption only return one. GetOption(name: '')
You receive all up-to-date values of options through getOption updates.
Sending error for request 11: error { code = 400 message = "Option can't be set" }
await TelegramClient().client!.send( tda.SetOption( name: 'Hello Another', value: tda.OptionValueString(value: "HEy I am here")), );
showing the error after setOptions
Only options starting with 'X' and 'x' are reserverd for app usage.
i want to create a folder so is there anyway of do it like.?
can u tell me the name which ( Option ) is best for storing ids?
Telegram has only chat folders, that can be created using createChatFolder
.
You can choose arbitrary name for custom options that starts with "x" or "X".
β β Error fetching file chat: TdFunctionException(function: {chat_id: 774194172, from_message_id: 0, offset: 0, limit: 10, only_local: false, @type: getChatHistory}, error: {code: 400, message: Chat not found, @type: error})|
showing this error. bro even though chat exist which is saved Messages. sometime work sometime didn't.
You can only pass identifiers received from the same TDLib instance.
If you want to get Saved Messages chat, then you need to call getMe
, then createPrivateChat
, and the use the received chat.
I already tried GetMe func before calling GetChatHistory function. And still showing the same thing.
You must pass chat_id
to getChatHistory
. You have no chat after calling getMe
.
I actually store the chat id in local storage when the app starts for the first time.
You can only pass identifiers received from the same TDLib instance.
i didn't understand bro can u more specific?
Apps aren't supposed to store anything persistently. Everything needed is stored by TDLib and must be obtained from it.
Text Message going fine. But on document or photo etc showing pending state
{chat_id: 774194172, last_message: {id: 7933526113, sender_id: {user_id: 774194172, @type: messageSenderUser}, chat_id: 774194172, sending_state: {sending_id: 0, @type: messageSendingStatePending}, scheduling_state: null, is_outgoing: true, is_pinned: false, is_from_offline: false, can_be_edited: false, can_be_forwarded: true, can_be_replied_in_another_chat: false, can_be_saved: true, can_be_deleted_only_for_self: true, can_be_deleted_for_all_users: false, can_get_added_reactions: false, can_get_statistics: false, can_get_message_thread: false, can_get_read_date: false, can_get_viewers: false, can_get_media_timestamp_links: false, can_report_reactions: false, has_timestamped_media: true, is_channel_post: false, is_topic_message: false, contains_unread_mention: false, date: 1715838604, edit_date: 0, forward_info: null, import_info: null, interaction_info: null, unread_reactions: [], reply_to: null, message_thread_id: 0, saved_messages_topic_id: 774194172, self_destruct_type: null, self_destruct_in: 0.0, auto_delete_in: 0.0, via_bot_user_id: 0, sender_business_bot_user_id: 0, sender_boost_count: 0, author_signature: , media_album_id: 0, restriction_reason: , content: {document: {file_name: Taska.png, mime_type: image/png, minithumbnail: null, thumbnail: null, document: {id: 39, size: 2173544, expected_size: 2173544, local: {path: C:\Users\aadil\OneDrive\Pictures\Freelance\Taska.png, can_be_downloaded: false, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: true, download_offset: 0, downloaded_prefix_size: 2173544, downloaded_size: 2173544, @type: localFile}, remote: {id: , unique_id: , is_uploading_active: true, is_uploading_completed: false, uploaded_size: 2173544, @type: remoteFile}, @type: file}, @type: document}, caption: {text: -u-t-s- 1715838604389 e-n-d- 1861186925 --lbl--, entities: [{offset: 8, length: 13, type: {@type: textEntityTypeBankCardNumber}, @type: textEntity}], @type: formattedText}, @type: messageDocument}, reply_markup: null, @type: message}, positions: [], @type: updateChatLastMessage}