feat: add Giphy support with embed component and power levels state management

This commit is contained in:
2026-04-21 21:35:47 +10:00
parent 7c824392b7
commit 9a463facce
14 changed files with 218 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ import { useMatrixClient } from '../../hooks/useMatrixClient';
import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback';
import { ErrorCode } from '../../cs-errorcode';
import { millisecondsToMinutes } from '../../utils/common';
import { createRoomEncryptionState } from '../../components/create-room';
import { createRoomEncryptionState, createRoomPowerLevelsState } from '../../components/create-room';
import { useAlive } from '../../hooks/useAlive';
import { getDirectRoomPath } from '../../pages/pathUtils';
@@ -29,6 +29,7 @@ export function CreateChat({ defaultUserId }: CreateChatProps) {
async (userId, encrypted) => {
const initialState: ICreateRoomStateEvent[] = [];
initialState.push(createRoomPowerLevelsState());
if (encrypted) initialState.push(createRoomEncryptionState());
const result = await mx.createRoom({