Closed wowka1319 closed 1 year ago
Are Chat ID in Http Bot API and TDLib the same?
If the same bot is logged in TDLib, then yes. Otherwise, the question doesn't make sense, because chat identifiers are user-specific.
Is the table correct?
Mostly. Private chats have chatTypePrivate
in TDLib.
@addmeto
channel and I see it's chat_id == -1001005993407
. Then I via another account get bot token and make HTTP GET request https://api.telegram.org/bot<?>:<?>/getChat?chat_id=@addmeto
and get the chat object when id is the same = -1001005993407
. Are these chat ids of the same supergroup always the same between TDLib and HttpAPI?This isn't guaranteed. There are no reasons to guarantee chat_id
persistence between different accounts.
That's unexpected. Ok, thank you.
supergroup_id
, basic_group_id
and user_id
persistence between different accounts unlike chat_id
?chat_id
for the same account persistence forever regardless of joining/leaving/chat removing/joining again?Are supergroup_id, basic_group_id and user_id persistence between different accounts unlike chat_id?
Currently, yes, but this can be changed in the future.
Is chat_id for the same account persistence forever regardless of joining/leaving/chat removing/joining again?
Currently, yes.
Currently, yes, but this can be changed in the future.
- What can that be necessary for?
- Will some unique id (persistence among accounts) remain after this change?
What can that be necessary for?
It is the opposite, for example, there are no reasons for basic group identifiers to be the same for different people.
Will some unique id (persistence among accounts) remain after this change?
Noone knows.
Is the message id persistence between accounts?
Is the message id persistence between accounts?
No and they never were the same for different users.
Is that true for messages of public channels too?
No, messages in public chats have the same message identifiers for all users.
For clarity, public chats are supergroups, that have active username only? What about supergroup without it (that have invite link only)?
Public chats are supergroups/channels with username or location. In private supergroups some users may not have access to some messages, but if the users have access to a message, then they will see the same message identifier.
Here you said message.date
of the same message can be different for different users. Why can that be possible? Is not it server side timestamp? Or you add inaccuracy to date intentionally?
It is just a server-side timestamp, which can be different for different users, expecially for users in different datacenters.