diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2024-03-21 19:27:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 19:27:34 +0100 |
commit | b9abbf7b20b4faaffe754c4a1ea4d5f0e7bd72b9 (patch) | |
tree | 36509a7245746cf95f82d581dad0a5f79b0b47da /roomserver/internal/api.go | |
parent | de954991787053b97936b8476d9a68fc29c289ae (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.go | 8 |
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) +} |