readd openid handling

This commit is contained in:
Gigiaj 2025-04-15 22:47:30 -05:00
parent 5f0ca6a794
commit cc88733204

View file

@ -14,6 +14,10 @@ import {
type ISearchUserDirectoryResult, type ISearchUserDirectoryResult,
type IGetMediaConfigResult, type IGetMediaConfigResult,
type UpdateDelayedEventAction, type UpdateDelayedEventAction,
OpenIDRequestState,
IOpenIDCredentials,
SimpleObservable,
IOpenIDUpdate,
} from 'matrix-widget-api'; } from 'matrix-widget-api';
import { import {
EventType, EventType,
@ -385,6 +389,13 @@ export class SmallWidgetDriver extends WidgetDriver {
return results.map((e) => e.getEffectiveEvent() as IRoomEvent); return results.map((e) => e.getEffectiveEvent() as IRoomEvent);
} }
public async askOpenID(observer: SimpleObservable<IOpenIDUpdate>): Promise<void> {
return observer.update({
state: OpenIDRequestState.Allowed,
token: await this.mxClient.getOpenIdToken(),
});
}
/** /**
* Reads the current values of all matching room state entries. * Reads the current values of all matching room state entries.
* @param roomId The ID of the room. * @param roomId The ID of the room.