@@ -127,6 +127,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
127127 if ( isError ( capabilityResult ) ) {
128128 this . messageCollector . addMessage (
129129 this . description ,
130+ this . capability ,
130131 renderFailedSingularConsequence (
131132 this . description ,
132133 title ,
@@ -135,7 +136,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
135136 ) ;
136137 return capabilityResult ;
137138 }
138- this . messageCollector . addOneliner ( this . description , title ) ;
139+ this . messageCollector . addOneliner ( this . description , this . capability , title ) ;
139140 return Ok ( undefined ) ;
140141 }
141142 public async consequenceForUsersInRoomSet (
@@ -149,6 +150,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
149150 ) ;
150151 this . messageCollector . addMessage (
151152 this . description ,
153+ this . capability ,
152154 renderFailedSingularConsequence (
153155 this . description ,
154156 title ,
@@ -163,6 +165,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
163165 }
164166 this . messageCollector . addMessage (
165167 this . description ,
168+ this . capability ,
166169 renderResultForUserInSetMap ( usersInSetMap , {
167170 ingword : "Banning" ,
168171 nnedword : "banned" ,
@@ -188,6 +191,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
188191 ) ;
189192 this . messageCollector . addMessage (
190193 this . description ,
194+ this . capability ,
191195 renderFailedSingularConsequence (
192196 this . description ,
193197 title ,
@@ -202,6 +206,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
202206 }
203207 this . messageCollector . addMessage (
204208 this . description ,
209+ this . capability ,
205210 renderResultForUsersInRoom ( resultMap , {
206211 summary : (
207212 < fragment >
@@ -233,6 +238,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
233238 ) ;
234239 this . messageCollector . addMessage (
235240 this . description ,
241+ this . capability ,
236242 renderFailedSingularConsequence (
237243 this . description ,
238244 title ,
@@ -247,6 +253,7 @@ class StandardUserConsequencesRenderer implements UserConsequences {
247253 }
248254 this . messageCollector . addMessage (
249255 this . description ,
256+ this . capability ,
250257 renderRoomSetResultForUser ( usersInSetMap , userID , "unbanned" , {
251258 description : this . description ,
252259 } )
@@ -266,6 +273,7 @@ describeCapabilityRenderer<UserConsequences, Draupnir>({
266273 capability
267274 ) ;
268275 } ,
276+ isDefaultForInterface : true ,
269277} ) ;
270278
271279describeCapabilityContextGlue < Draupnir , StandardUserConsequencesContext > ( {
@@ -282,3 +290,16 @@ describeCapabilityContextGlue<Draupnir, StandardUserConsequencesContext>({
282290 } ) ;
283291 } ,
284292} ) ;
293+
294+ describeCapabilityContextGlue < Draupnir , StandardUserConsequencesContext > ( {
295+ name : "SimulatedUserConsequences" ,
296+ glueMethod : function (
297+ protectionDescription ,
298+ draupnir ,
299+ capabilityProvider
300+ ) : Capability {
301+ return capabilityProvider . factory ( protectionDescription , {
302+ setMembership : draupnir . protectedRoomsSet . setRoomMembership ,
303+ } as StandardUserConsequencesContext ) ;
304+ } ,
305+ } ) ;
0 commit comments