test: add sticker event method to EventFactory
This commit is contained in:
committed by
Ivan Enderlin
parent
edabb2362b
commit
b6569762db
@@ -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<String>,
|
||||
info: ImageInfo,
|
||||
url: OwnedMxcUri,
|
||||
) -> EventBuilder<StickerEventContent> {
|
||||
self.event(StickerEventContent::new(body.into(), info, url))
|
||||
}
|
||||
|
||||
/// Set the next server timestamp.
|
||||
///
|
||||
/// Timestamps will continue to increase by 1 (millisecond) from that value.
|
||||
|
||||
Reference in New Issue
Block a user