bot
bot copied to clipboard
/backup /restore user commands
Given the recent loss of data we could give the user the possibility to "hold" their user data (stats).
/backup - returns a nostr event signed by the bot's nsec. content is user data as JSON and must include user's npub (depends on /setnpub from #360)
/restore - receives a nostr event signed by the user's nsec where content is the event generated by /backup. Bot then checks that both user's npubs match and restores user.
Notes:
- Backup's
updatedAtshould be newer than user'supdatedAt - Could enable user migration to a new telegram account (cases where a user needs to change their telegram account but keep their stats)
I think in order to preserve user's privacy we should encrypt the data and to make easier the restore process we should base64 encode/decode the data