aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/api.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-03-21 19:27:34 +0100
committerGitHub <noreply@github.com>2024-03-21 19:27:34 +0100
commitb9abbf7b20b4faaffe754c4a1ea4d5f0e7bd72b9 (patch)
tree36509a7245746cf95f82d581dad0a5f79b0b47da /roomserver/internal/api.go
parentde954991787053b97936b8476d9a68fc29c289ae (diff)
Add event reporting (#3340)
Part of #3216 and #3226 There will be a follow up PR which is going to add the same admin endpoints Synapse has, so existing tools also work for Dendrite.
Diffstat (limited to 'roomserver/internal/api.go')
-rw-r--r--roomserver/internal/api.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go
index 1e08f6a3..a71fd2d1 100644
--- a/roomserver/internal/api.go
+++ b/roomserver/internal/api.go
@@ -340,3 +340,11 @@ func (r *RoomserverInternalAPI) SigningIdentityFor(ctx context.Context, roomID s
func (r *RoomserverInternalAPI) AssignRoomNID(ctx context.Context, roomID spec.RoomID, roomVersion gomatrixserverlib.RoomVersion) (roomNID types.RoomNID, err error) {
return r.DB.AssignRoomNID(ctx, roomID, roomVersion)
}
+
+func (r *RoomserverInternalAPI) InsertReportedEvent(
+ ctx context.Context,
+ roomID, eventID, reportingUserID, reason string,
+ score int64,
+) (int64, error) {
+ return r.DB.InsertReportedEvent(ctx, roomID, eventID, reportingUserID, reason, score)
+}