Skip to content

Commit cebbeee

Browse files
committed
Add return type to createInitialState
1 parent 0d43d99 commit cebbeee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/bridge-info-state.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ export interface MSC2346Content extends MappingInfo {
3535
bridgebot: string;
3636
}
3737

38+
export interface InitialEvent {
39+
type: string,
40+
content: MSC2346Content,
41+
state_key: string,
42+
}
43+
3844
interface Opts<BridgeMappingInfo> {
3945
/**
4046
* The name of the bridge implementation, ideally in Java package naming format:
@@ -110,7 +116,7 @@ export class BridgeInfoStateSyncer<BridgeMappingInfo> {
110116
}
111117
}
112118

113-
public async createInitialState(roomId: string, bridgeMappingInfo: BridgeMappingInfo) {
119+
public async createInitialState(roomId: string, bridgeMappingInfo: BridgeMappingInfo): Promise<InitialEvent> {
114120
const mapping = await this.opts.getMapping(roomId, bridgeMappingInfo);
115121
return {
116122
type: BridgeInfoStateSyncer.EventType,

0 commit comments

Comments
 (0)