Partially revert "Implement perfect forward secrecy for MTProto (#4618)"

This partially reverts commit 5a3a94eb51.
It should be re-introduced once the rest of comments are addressed.

Session changes are kept for the future, even if unused for now,
as there may be people who have already upgraded their session.
This commit is contained in:
Lonami Exo
2025-11-13 18:09:38 +01:00
parent 5a3a94eb51
commit 302a9a8c5f
8 changed files with 40 additions and 206 deletions

View File

@@ -60,8 +60,7 @@ class MessagePacker:
if size <= MessageContainer.MAXIMUM_SIZE:
state.msg_id = self._state.write_data_as_message(
buffer, state.data, isinstance(state.request, TLRequest),
after_id=state.after.msg_id if state.after else None,
msg_id=state.msg_id
after_id=state.after.msg_id if state.after else None
)
batch.append(state)
self._log.debug('Assigned msg_id = %d to %s (%x)',