You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Implement Left Panel User Widget
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ export interface IWidget {
|
||||
type: string;
|
||||
sender: string;
|
||||
state_key: string;
|
||||
content: IApp;
|
||||
content: Partial<IApp>;
|
||||
}
|
||||
|
||||
export default class WidgetUtils {
|
||||
@@ -410,7 +410,7 @@ export default class WidgetUtils {
|
||||
return client.setAccountData('m.widgets', userWidgets);
|
||||
}
|
||||
|
||||
static makeAppConfig(appId: string, app: IApp, senderUserId: string, roomId: string | null, eventId: string): IApp {
|
||||
static makeAppConfig(appId: string, app: Partial<IApp>, senderUserId: string, roomId: string | null, eventId: string): IApp {
|
||||
if (!senderUserId) {
|
||||
throw new Error("Widgets must be created by someone - provide a senderUserId");
|
||||
}
|
||||
@@ -421,7 +421,7 @@ export default class WidgetUtils {
|
||||
app.eventId = eventId;
|
||||
app.name = app.name || app.type;
|
||||
|
||||
return app;
|
||||
return app as IApp;
|
||||
}
|
||||
|
||||
static getCapWhitelistForAppTypeInRoomId(appType: string, roomId: string): Capability[] {
|
||||
|
||||
Reference in New Issue
Block a user