Skip to content

Commit

Permalink
Rename infoMapping to initialEvent (#1672)
Browse files Browse the repository at this point in the history
* Rename infoMapping to initialEvent

The info mapping is the second argument to createInitialState, not what it returns

* Update 1672.misc

---------

Co-authored-by: Will Hunt <[email protected]>
  • Loading branch information
progval and Half-Shot authored Apr 28, 2023
1 parent a750678 commit 227aae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/1672.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename internal variable infoMapping to initialEvent.
8 changes: 4 additions & 4 deletions src/provisioning/Provisioner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ export class Provisioner extends ProvisioningApi {
// Send bridge info state event
if (this.ircBridge.stateSyncer) {
const intent = this.ircBridge.getAppServiceBridge().getIntent();
const infoMapping = await this.ircBridge.stateSyncer.createInitialState(roomId, {
const initialEvent = await this.ircBridge.stateSyncer.createInitialState(roomId, {
channel: ircChannel,
networkId: server.getNetworkId(),
})
await intent.sendStateEvent(
roomId,
infoMapping.type,
infoMapping.state_key,
infoMapping.content as unknown as Record<string, unknown>,
initialEvent.type,
initialEvent.state_key,
initialEvent.content as unknown as Record<string, unknown>,
);
}
}
Expand Down

0 comments on commit 227aae6

Please sign in to comment.