From 75d2ebb8c83a419131b2f503a06b9e95c115049c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 21 Feb 2023 19:16:03 +0100 Subject: [PATCH] Fix the omitemptys, and remove debug print. --- misc/infrastructure/powerbot/powerlevels.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/infrastructure/powerbot/powerlevels.go b/misc/infrastructure/powerbot/powerlevels.go index 7e480eb4..eb11f790 100644 --- a/misc/infrastructure/powerbot/powerlevels.go +++ b/misc/infrastructure/powerbot/powerlevels.go @@ -187,10 +187,10 @@ type powerLevelsWithDefaults struct { // This struct is a copy of the public stuff in event.PowerLevelsEventContent, // but with omitempty removed on users_default and events_default to work around // https://github.com/matrix-org/dendrite/issues/2983 - Users map[id.UserID]int `json:"users"` - UsersDefault int `json:"users_default,omitempty"` - Events map[string]int `json:"events"` - EventsDefault int `json:"events_default,omitempty"` + Users map[id.UserID]int `json:"users,omitempty"` + UsersDefault int `json:"users_default"` + Events map[string]int `json:"events,omitempty"` + EventsDefault int `json:"events_default"` Notifications *event.NotificationPowerLevels `json:"notifications,omitempty"` StateDefaultPtr *int `json:"state_default,omitempty"` InvitePtr *int `json:"invite,omitempty"` -- 2.39.2