Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/backup /restore user commands #361

Open
dolchi21 opened this issue Mar 3, 2023 · 1 comment
Open

/backup /restore user commands #361

dolchi21 opened this issue Mar 3, 2023 · 1 comment

Comments

@dolchi21
Copy link
Contributor

dolchi21 commented Mar 3, 2023

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 updatedAt should be newer than user's updatedAt
  • Could enable user migration to a new telegram account (cases where a user needs to change their telegram account but keep their stats)
@grunch
Copy link
Member

grunch commented May 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants