@@ -156,21 +156,21 @@ export const options = {
156156 // intercept local permalinks to users and show them like userids (in userinfo of current room)
157157 try {
158158 const permalink = parsePermalink ( href ) ;
159- if ( permalink && permalink . userId ) {
159+ if ( permalink ? .userId ) {
160160 return {
161161 // @ts -ignore see https://linkify.js.org/docs/options.html
162- click : function ( e ) {
162+ click : function ( e : MouseEvent ) {
163163 onUserClick ( e , permalink . userId ) ;
164164 } ,
165165 } ;
166166 } else {
167- // for events, rooms etc. (anything other then users)
167+ // for events, rooms etc. (anything other than users)
168168 const localHref = tryTransformPermalinkToLocalHref ( href ) ;
169169 if ( localHref !== href ) {
170170 // it could be converted to a localHref -> therefore handle locally
171171 return {
172172 // @ts -ignore see https://linkify.js.org/docs/options.html
173- click : function ( e ) {
173+ click : function ( e : MouseEvent ) {
174174 e . preventDefault ( ) ;
175175 window . location . hash = localHref ;
176176 } ,
@@ -185,15 +185,15 @@ export const options = {
185185 case Type . UserId :
186186 return {
187187 // @ts -ignore see https://linkify.js.org/docs/options.html
188- click : function ( e ) {
188+ click : function ( e : MouseEvent ) {
189189 const userId = parsePermalink ( href ) . userId ;
190190 onUserClick ( e , userId ) ;
191191 } ,
192192 } ;
193193 case Type . RoomAlias :
194194 return {
195195 // @ts -ignore see https://linkify.js.org/docs/options.html
196- click : function ( e ) {
196+ click : function ( e : MouseEvent ) {
197197 const alias = parsePermalink ( href ) . roomIdOrAlias ;
198198 onAliasClick ( e , alias ) ;
199199 } ,
@@ -202,7 +202,7 @@ export const options = {
202202 case Type . GroupId :
203203 return {
204204 // @ts -ignore see https://linkify.js.org/docs/options.html
205- click : function ( e ) {
205+ click : function ( e : MouseEvent ) {
206206 const groupId = parsePermalink ( href ) . groupId ;
207207 onGroupClick ( e , groupId ) ;
208208 } ,
0 commit comments