From 99859a8afc564a753309b48ad8735b90c318094f Mon Sep 17 00:00:00 2001 From: Cnly Date: Thu, 1 Aug 2019 12:33:05 +0800 Subject: [PATCH] Add docs for validateRedactions Signed-off-by: Alex Chen --- roomserver/storage/storage.go | 3 +++ syncapi/storage/syncserver.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index 28bb27863..40340ff20 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -352,6 +352,9 @@ func (d *Database) fetchRedactionEvents( return } +// validateRedactions attempts to validate the given redactions. +// Returns redactions that are successfully validated. +// It will update the validation status in the database for the validated redactions. func (d *Database) validateRedactions( ctx context.Context, unvalidatedRedactions redactedToRedactionMap, diff --git a/syncapi/storage/syncserver.go b/syncapi/storage/syncserver.go index 96001e63a..7bc81bc7f 100644 --- a/syncapi/storage/syncserver.go +++ b/syncapi/storage/syncserver.go @@ -977,6 +977,9 @@ func (d *SyncServerDatasource) fetchRedactionEvents( return } +// validateRedactions attempts to validate the given redactions. +// Returns redactions that are successfully validated. +// It will update the validation status in the database for the validated redactions. func (d *SyncServerDatasource) validateRedactions( ctx context.Context, txn *sql.Tx,