Restoring users with topics and subscriptions after soft deletion.
38 views
Skip to first unread message
Alex Frost
unread,
Mar 26, 2024, 9:51:13 AM3/26/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tinode General
I'm using postgres db. After soft deletion, the user state, his topics state and subscriptions state changes to `StateDeleted` I can restore the user using the `Update` and UpdateState` methods of `usersMapper` struct. Which use `UserUpdate` method of postgres adapter. But, how can I restore user's topics and subscriptions? Are there any methods or perhaps there is another way to restore a user after a soft deletion?
Gene
unread,
Mar 26, 2024, 11:40:27 AM3/26/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tinode General
These is no method to un-soft-delete users because no one ever asked for it. If you need it you can create it. For example, you can generalize UserDelete(uid t.Uid, hard bool) to change State to whatever state you want as opposite to hard-coded StateDeleted.
Alex Frost
unread,
Mar 26, 2024, 12:49:56 PM3/26/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message