diff --git a/roomserver/internal/perform/perform_admin.go b/roomserver/internal/perform/perform_admin.go index 6de115c04..19f2493c9 100644 --- a/roomserver/internal/perform/perform_admin.go +++ b/roomserver/internal/perform/perform_admin.go @@ -28,6 +28,7 @@ import ( "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" + "github.com/sirupsen/logrus" ) type Admin struct { @@ -245,6 +246,9 @@ func (r *Admin) PerformAdminPurgeRoom( return nil } + logrus.WithField("room_id", req.RoomID).Warn("Purging room from roomserver") + defer logrus.WithField("room_id", req.RoomID).Warn("Room purged from roomserver") + if err := r.DB.PurgeRoom(ctx, req.RoomID); err != nil { res.Error = &api.PerformError{ Code: api.PerformErrorBadRequest, @@ -253,5 +257,12 @@ func (r *Admin) PerformAdminPurgeRoom( return nil } - return nil + return r.Inputer.OutputProducer.ProduceRoomEvents(req.RoomID, []api.OutputEvent{ + { + Type: api.OutputTypePurgeRoom, + PurgeRoom: &api.OutputPurgeRoom{ + RoomID: req.RoomID, + }, + }, + }) }