thedemons / opentele

A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.
https://opentele.readthedocs.io/
MIT License
306 stars 99 forks source link

Add new mapKeys. #118

Closed 0xKodzy closed 5 months ago

Vladislav558 commented 6 months ago

It works, but you also need to add to configs.py

Add at the end:

class lskType(int):  # nocov
    lskUserMap = 0x00
    lskDraft = 0x01 # data: PeerId peer
    lskDraftPosition = 0x02 # data: PeerId peer
    lskLegacyImages = 0x03 # legacy
    lskLocations = 0x04 # no data
    lskLegacyStickerImages = 0x05 # legacy
    lskLegacyAudios = 0x06 # legacy
    lskRecentStickersOld = 0x07 # no data
    lskBackgroundOldOld = 0x08 # no data
    lskUserSettings = 0x09 # no data
    lskRecentHashtagsAndBots = 0x0A # no data
    lskStickersOld = 0x0B # no data
    lskSavedPeersOld = 0x0C # no data
    lskReportSpamStatusesOld = 0x0D # no data
    lskSavedGifsOld = 0x0E # no data
    lskSavedGifs = 0x0F # no data
    lskStickersKeys = 0x10 # no data
    lskTrustedBots = 0x11 # no data
    lskFavedStickers = 0x12 # no data
    lskExportSettings = 0x13 # no data
    lskBackgroundOld = 0x14 # no data
    lskSelfSerialized = 0x15 # serialized self
    lskMasksKeys = 0x16 # no data
    lskCustomEmojiKeys = 0x17 # no data
    lskSearchSuggestions = 0x18 # no data
    lskWebviewTokens = 0x19 # data: QByteArray of bots, QByteArray of others

And not deleted api here:

        self.__mtpKeys: typing.List[td.AuthKey] = []
        self.__mtpKeysToDestroy: typing.List[td.AuthKey] = []
        self.api = api
0xKodzy commented 6 months ago

Oh, yeah, my bad. Never actually used cli git, but instead used ui git and forgot to upload config.py as well. Big mistake on my part.

Also yeah, should've left api line untouched for pull request. It threw errors at me when I tried to use it for multiple accounts, so I decided to comment it.