bot icon indicating copy to clipboard operation
bot copied to clipboard

/backup /restore user commands

Open dolchi21 opened this issue 2 years ago • 1 comments

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)

dolchi21 avatar Mar 03 '23 16:03 dolchi21

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

grunch avatar May 30 '23 15:05 grunch