mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
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.
This commit is contained in:
parent
de95499178
commit
b9abbf7b20
12 changed files with 474 additions and 1 deletions
|
@ -30,6 +30,7 @@ import (
|
|||
|
||||
type Database interface {
|
||||
UserRoomKeys
|
||||
ReportedEvents
|
||||
// Do we support processing input events for more than one room at a time?
|
||||
SupportsConcurrentRoomInputs() bool
|
||||
AssignRoomNID(ctx context.Context, roomID spec.RoomID, roomVersion gomatrixserverlib.RoomVersion) (roomNID types.RoomNID, err error)
|
||||
|
@ -257,3 +258,11 @@ type EventDatabase interface {
|
|||
) (gomatrixserverlib.PDU, gomatrixserverlib.PDU, error)
|
||||
StoreEvent(ctx context.Context, event gomatrixserverlib.PDU, roomInfo *types.RoomInfo, eventTypeNID types.EventTypeNID, eventStateKeyNID types.EventStateKeyNID, authEventNIDs []types.EventNID, isRejected bool) (types.EventNID, types.StateAtEvent, error)
|
||||
}
|
||||
|
||||
type ReportedEvents interface {
|
||||
InsertReportedEvent(
|
||||
ctx context.Context,
|
||||
roomID, eventID, reportingUserID, reason string,
|
||||
score int64,
|
||||
) (int64, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue