From b6569762db585fda392b9aff450e4441c6fa385a Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Sun, 1 Jun 2025 16:39:23 +0100 Subject: [PATCH] test: add sticker event method to `EventFactory` --- testing/matrix-sdk-test/src/event_factory.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testing/matrix-sdk-test/src/event_factory.rs b/testing/matrix-sdk-test/src/event_factory.rs index 55bd10806..8fc5327b3 100644 --- a/testing/matrix-sdk-test/src/event_factory.rs +++ b/testing/matrix-sdk-test/src/event_factory.rs @@ -55,7 +55,9 @@ use ruma::{ server_acl::RoomServerAclEventContent, tombstone::RoomTombstoneEventContent, topic::RoomTopicEventContent, + ImageInfo, }, + sticker::StickerEventContent, typing::TypingEventContent, AnyMessageLikeEvent, AnyStateEvent, AnySyncStateEvent, AnySyncTimelineEvent, AnyTimelineEvent, BundledMessageLikeRelations, EventContent, @@ -901,6 +903,16 @@ impl EventFactory { self.event(BeaconEventContent::new(beacon_info_event_id, geo_uri, ts)) } + /// Create a new `m.sticker` event. + pub fn sticker( + &self, + body: impl Into, + info: ImageInfo, + url: OwnedMxcUri, + ) -> EventBuilder { + self.event(StickerEventContent::new(body.into(), info, url)) + } + /// Set the next server timestamp. /// /// Timestamps will continue to increase by 1 (millisecond) from that value.