aboutsummaryrefslogtreecommitdiff
path: root/test/event.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/event.go')
-rw-r--r--test/event.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/event.go b/test/event.go
index 40cb8f0e..73fc656b 100644
--- a/test/event.go
+++ b/test/event.go
@@ -52,6 +52,24 @@ func WithUnsigned(unsigned interface{}) eventModifier {
}
}
+func WithKeyID(keyID gomatrixserverlib.KeyID) eventModifier {
+ return func(e *eventMods) {
+ e.keyID = keyID
+ }
+}
+
+func WithPrivateKey(pkey ed25519.PrivateKey) eventModifier {
+ return func(e *eventMods) {
+ e.privKey = pkey
+ }
+}
+
+func WithOrigin(origin gomatrixserverlib.ServerName) eventModifier {
+ return func(e *eventMods) {
+ e.origin = origin
+ }
+}
+
// Reverse a list of events
func Reversed(in []*gomatrixserverlib.HeaderedEvent) []*gomatrixserverlib.HeaderedEvent {
out := make([]*gomatrixserverlib.HeaderedEvent, len(in))