@@ -229,6 +229,7 @@ export const messageLinkPress =
229
229
const streamsById = getStreamsById ( state ) ;
230
230
const streamsByName = getStreamsByName ( state ) ;
231
231
const ownUserId = getOwnUserId ( state ) ;
232
+ const globalSettings = getGlobalSettings ( ) ;
232
233
233
234
const parsedUrl = tryParseUrl ( href , auth . realm ) ;
234
235
if ( ! parsedUrl ) {
@@ -252,7 +253,7 @@ export const messageLinkPress =
252
253
// …Could also be an invalid narrow link, or one that we *could*
253
254
// parse but just haven't (e.g., operands in an unexpected order).
254
255
// Opening the browser won't be ideal in those cases.
255
- openLinkWithUserPreference ( parsedUrl , getGlobalSettings ( ) ) ;
256
+ openLinkWithUserPreference ( parsedUrl , globalSettings ) ;
256
257
return ;
257
258
}
258
259
@@ -277,9 +278,9 @@ export const messageLinkPress =
277
278
278
279
await dispatch ( doNarrowNearLink ( narrow , nearOperand ) ) ;
279
280
} else if ( ! isUrlOnRealm ( parsedUrl , auth . realm ) ) {
280
- openLinkWithUserPreference ( parsedUrl , getGlobalSettings ( ) ) ;
281
+ openLinkWithUserPreference ( parsedUrl , globalSettings ) ;
281
282
} else {
282
283
const url = ( await api . tryGetFileTemporaryUrl ( parsedUrl , auth ) ) ?? parsedUrl ;
283
- openLinkWithUserPreference ( url , getGlobalSettings ( ) ) ;
284
+ openLinkWithUserPreference ( url , globalSettings ) ;
284
285
}
285
286
} ;
0 commit comments