From 9b40cfe95c94a8bb569918a54c3691fe0dfed6f2 Mon Sep 17 00:00:00 2001 From: Eyal Sawady Date: Thu, 22 Apr 2021 03:21:41 -0400 Subject: [PATCH] handleUserDelete: delete the correct user Prior to this, we deleted the user issuing the deletion rather than the user which should've been deleted. --- service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.go b/service.go index 01e27d9..3b92af9 100644 --- a/service.go +++ b/service.go @@ -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) }