Skip to content

Commit

Permalink
/issues/5114 - Added support for unstable poll prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Feb 11, 2022
1 parent 94dab7a commit 215f6dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,17 @@ final class PollEditFormCoordinator: Coordinator, Presentable {
}

private static func pollDetailsTypeToKindKey(_ type: EditFormPollType) -> String {
let mapping = [EditFormPollType.disclosed : kMXMessageContentKeyExtensiblePollKindDisclosed,
EditFormPollType.undisclosed : kMXMessageContentKeyExtensiblePollKindUndisclosed]
let mapping = [EditFormPollType.disclosed : kMXMessageContentKeyExtensiblePollKindDisclosedMSC3381,
EditFormPollType.undisclosed : kMXMessageContentKeyExtensiblePollKindUndisclosedMSC3381]

return mapping[type] ?? kMXMessageContentKeyExtensiblePollKindDisclosed
return mapping[type] ?? kMXMessageContentKeyExtensiblePollKindDisclosedMSC3381
}

private static func pollKindKeyToDetailsType(_ key: String) -> EditFormPollType {
let mapping = [kMXMessageContentKeyExtensiblePollKindDisclosed : EditFormPollType.disclosed,
kMXMessageContentKeyExtensiblePollKindUndisclosed : EditFormPollType.undisclosed]
kMXMessageContentKeyExtensiblePollKindDisclosedMSC3381 : EditFormPollType.disclosed,
kMXMessageContentKeyExtensiblePollKindUndisclosed : EditFormPollType.undisclosed,
kMXMessageContentKeyExtensiblePollKindUndisclosedMSC3381 : EditFormPollType.undisclosed]

return mapping[key] ?? EditFormPollType.disclosed
}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/5114.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added support for unstable poll prefixes.

0 comments on commit 215f6dc

Please sign in to comment.