aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/tables/interface.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-07 12:51:55 +0100
committerGitHub <noreply@github.com>2020-07-07 12:51:55 +0100
commit99ea1f9b4875e9458e640daa3358c3e9ad4fe065 (patch)
treefab2f5ccf12241cdfa4323525590957276e23c8c /roomserver/storage/tables/interface.go
parentd7a8bbff72194ea41d33aba49bfa3caf9a40e721 (diff)
Emit redacted_event from the roomserver when redactions are validated (#1186)
* Emit redacted_event from the roomserver when redactions are validated - Consume them in the currentstateserver and act accordingly. - Add integration test for the roomserver to check that injecting `m.room.redaction` events result in `redacted_event` being emitted. * Linting * Ignore events that redact themselves
Diffstat (limited to 'roomserver/storage/tables/interface.go')
-rw-r--r--roomserver/storage/tables/interface.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/roomserver/storage/tables/interface.go b/roomserver/storage/tables/interface.go
index c6eb6696..78273b3c 100644
--- a/roomserver/storage/tables/interface.go
+++ b/roomserver/storage/tables/interface.go
@@ -139,10 +139,10 @@ type RedactionInfo struct {
type Redactions interface {
InsertRedaction(ctx context.Context, txn *sql.Tx, info RedactionInfo) error
- // SelectRedactedEvent returns the redaction info for the given redaction event ID, or nil if there is no match.
- SelectRedactedEvent(ctx context.Context, txn *sql.Tx, redactionEventID string) (*RedactionInfo, error)
- // SelectRedactionEvent returns the redaction info for the given redacted event ID, or nil if there is no match.
- SelectRedactionEvent(ctx context.Context, txn *sql.Tx, redactedEventID string) (*RedactionInfo, error)
+ // SelectRedactionInfoByRedactionEventID returns the redaction info for the given redaction event ID, or nil if there is no match.
+ SelectRedactionInfoByRedactionEventID(ctx context.Context, txn *sql.Tx, redactionEventID string) (*RedactionInfo, error)
+ // SelectRedactionInfoByEventBeingRedacted returns the redaction info for the given redacted event ID, or nil if there is no match.
+ SelectRedactionInfoByEventBeingRedacted(ctx context.Context, txn *sql.Tx, eventID string) (*RedactionInfo, error)
// Mark this redaction event as having been validated. This means we have both sides of the redaction and have
// successfully redacted the event JSON.
MarkRedactionValidated(ctx context.Context, txn *sql.Tx, redactionEventID string, validated bool) error