1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Use js-sdk imports for poll event types instead of events-sdk (#9904)

* Use js-sdk imports for poll event types instead of events-sdk

* Attempt to appease some tsc --strict errors

* Manually create poll response in cypress test
This commit is contained in:
Travis Ralston
2023-01-13 10:02:33 -07:00
committed by GitHub
parent 6052db1e8a
commit badb2c4b27
23 changed files with 69 additions and 71 deletions

View File

@ -15,9 +15,10 @@ limitations under the License.
*/
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
import { M_TEXT, M_POLL_START, POLL_ANSWER, M_POLL_KIND_DISCLOSED } from "matrix-events-sdk";
import { M_POLL_START, PollAnswer, M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
export const makePollStartEvent = (question: string, sender: string, answers?: POLL_ANSWER[]): MatrixEvent => {
export const makePollStartEvent = (question: string, sender: string, answers?: PollAnswer[]): MatrixEvent => {
if (!answers) {
answers = [
{ id: "socks", [M_TEXT.name]: "Socks" },