@@ -26,9 +26,11 @@ import {
2626 RoomStateMembershipRevisionIssuer ,
2727 RoomStatePolicyRoomRevisionIssuer ,
2828 RoomStateRevisionIssuer ,
29+ SHA256HashStore ,
2930 StandardPolicyRoomRevision ,
3031 StandardRoomMembershipRevision ,
3132 StandardRoomStateRevisionIssuer ,
33+ StandardSHA256HashReverser ,
3234 StateEvent ,
3335 isError ,
3436 isOk ,
@@ -117,13 +119,13 @@ export class RoomStateManagerFactory {
117119 if ( isError ( roomStateIssuer ) ) {
118120 return roomStateIssuer ;
119121 }
120- return Ok (
121- new RoomStatePolicyRoomRevisionIssuer (
122- room ,
123- StandardPolicyRoomRevision . blankRevision ( room ) ,
124- roomStateIssuer . ok
125- )
122+ const issuer = new RoomStatePolicyRoomRevisionIssuer (
123+ room ,
124+ StandardPolicyRoomRevision . blankRevision ( room ) ,
125+ roomStateIssuer . ok
126126 ) ;
127+ this . sha256Reverser ?. addPolicyRoomRevisionIssuer ( issuer ) ;
128+ return Ok ( issuer ) ;
127129 } ) ;
128130
129131 private readonly roomMembershipIssuers : InternedInstanceFactory <
@@ -149,11 +151,15 @@ export class RoomStateManagerFactory {
149151 ) ;
150152 } ) ;
151153
154+ private readonly sha256Reverser = this . hashStore
155+ ? new StandardSHA256HashReverser ( this . hashStore )
156+ : undefined ;
152157 constructor (
153158 public readonly clientsInRoomMap : ClientsInRoomMap ,
154159 private readonly clientProvider : ClientForUserID ,
155160 private readonly eventDecoder : EventDecoder ,
156- private readonly roomStateBackingStore ?: RoomStateBackingStore
161+ private readonly roomStateBackingStore : RoomStateBackingStore | undefined ,
162+ private readonly hashStore : SHA256HashStore | undefined
157163 ) {
158164 // nothing to do.
159165 }
0 commit comments