handleUserDelete: delete the correct user

Prior to this, we deleted the user issuing the deletion rather than the
user which should've been deleted.
This commit is contained in:
Eyal Sawady 2021-04-22 03:21:41 -04:00 committed by Simon Ser
parent 706b6e33fb
commit 9b40cfe95c

View File

@ -699,7 +699,7 @@ func handleUserDelete(dc *downstreamConn, params []string) error {
u.stop()
if err := dc.srv.db.DeleteUser(dc.user.ID); err != nil {
if err := dc.srv.db.DeleteUser(u.ID); err != nil {
return fmt.Errorf("failed to delete user: %v", err)
}