td icon indicating copy to clipboard operation
td copied to clipboard

Add a sugared wrapper around takeout functions

Open flexagoon opened this issue 1 year ago • 1 comments

Description

Currently you have to manually start a takeout session and wrap all of your calls in a InvokeWithTakeout. It would be nice to have a wrapper which streamlines this process.

References

Here's how Telethon does it:

https://docs.telethon.dev/en/stable/modules/client.html#telethon.client.account.AccountMethods.takeout

They have a special client class which wraps all of the method calls in an InvokeWithTakeout.

flexagoon avatar Mar 06 '24 14:03 flexagoon

Looking at it, it seems like currently you can't even easily invoke things with a takeout session at all? You have to manually wrap the request and run it with Invoke().

flexagoon avatar Mar 06 '24 18:03 flexagoon