Skip to content

Commit

Permalink
ffi: Add push notification support for unstable m.poll.start
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Grillo authored Sep 26, 2023
1 parent f47b7f0 commit b248aa9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bindings/matrix-sdk-ffi/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub enum MessageLikeEventContent {
KeyVerificationKey,
KeyVerificationMac,
KeyVerificationDone,
Poll { question: String },
ReactionContent { related_event_id: String },
RoomEncrypted,
RoomMessage { message_type: MessageType, in_reply_to_event_id: Option<String> },
Expand Down Expand Up @@ -163,6 +164,12 @@ impl TryFrom<AnySyncMessageLikeEvent> for MessageLikeEventContent {
AnySyncMessageLikeEvent::KeyVerificationDone(_) => {
MessageLikeEventContent::KeyVerificationDone
}
AnySyncMessageLikeEvent::UnstablePollStart(content) => {
let original_content = get_message_like_event_original_content(content)?;
MessageLikeEventContent::Poll {
question: original_content.poll_start().question.text.clone(),
}
}
AnySyncMessageLikeEvent::Reaction(content) => {
let original_content = get_message_like_event_original_content(content)?;
MessageLikeEventContent::ReactionContent {
Expand Down

0 comments on commit b248aa9

Please sign in to comment.