mirror of
https://github.com/element-hq/dendrite.git
synced 2025-07-01 16:26:26 +00:00
27 lines
685 B
Go
27 lines
685 B
Go
// Copyright 2024 New Vector Ltd.
|
|
// Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
// Please see LICENSE files in the repository root for full details.
|
|
|
|
package perform
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/element-hq/dendrite/roomserver/api"
|
|
"github.com/element-hq/dendrite/roomserver/storage"
|
|
)
|
|
|
|
type Forgetter struct {
|
|
DB storage.Database
|
|
}
|
|
|
|
// PerformForget implements api.RoomServerQueryAPI
|
|
func (f *Forgetter) PerformForget(
|
|
ctx context.Context,
|
|
request *api.PerformForgetRequest,
|
|
response *api.PerformForgetResponse,
|
|
) error {
|
|
return f.DB.ForgetRoom(ctx, request.UserID, request.RoomID, true)
|
|
}
|