File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -1175,10 +1175,9 @@ export class MatrixHandler {
11751175 // we check event.content.body since ircAction already has the markers stripped
11761176 const codeBlockMatch = event . content . body . match ( / ^ ` ` ` ( \w + ) ? / ) ;
11771177 if ( codeBlockMatch ) {
1178- const type = codeBlockMatch [ 1 ] ? ` ${ codeBlockMatch [ 1 ] } ` : '' ;
11791178 event . content = {
1180- msgtype : "m.emote" ,
1181- body : `sent a ${ type } code block: ${ httpUrl } `
1179+ ... event . content ,
1180+ body : `${ httpUrl } `
11821181 } ;
11831182 }
11841183 else {
@@ -1209,7 +1208,7 @@ export class MatrixHandler {
12091208 // Modify the event to become a truncated version of the original
12101209 // the truncation limits the number of lines sent to lineLimit.
12111210
1212- const msg = '\n... (truncated)' ;
1211+ const msg = '\n(truncated)' ;
12131212
12141213 const sendingEvent : MatrixMessageEvent = { ...event ,
12151214 content : {
Original file line number Diff line number Diff line change @@ -54,18 +54,18 @@ export class IrcAction {
5454 return new IrcAction ( matrixAction . type , matrixAction . text , matrixAction . ts ) ;
5555 case "image" :
5656 return new IrcAction (
57- "emote " , "uploaded an image: " + matrixAction . text , matrixAction . ts
57+ "message " , "" + matrixAction . text , matrixAction . ts
5858 ) ;
5959 case "video" :
6060 return new IrcAction (
61- "emote " , "uploaded a video: " + matrixAction . text , matrixAction . ts
61+ "message " , "" + matrixAction . text , matrixAction . ts
6262 ) ;
6363 case "audio" :
6464 return new IrcAction (
65- "emote " , "uploaded an audio file: " + matrixAction . text , matrixAction . ts
65+ "message " , "" + matrixAction . text , matrixAction . ts
6666 ) ;
6767 case "file" :
68- return new IrcAction ( "emote " , "posted a file: " + matrixAction . text , matrixAction . ts ) ;
68+ return new IrcAction ( "message " , "" + matrixAction . text , matrixAction . ts ) ;
6969 case "topic" :
7070 if ( matrixAction . text === null ) {
7171 break ;
Original file line number Diff line number Diff line change @@ -220,12 +220,12 @@ export class MatrixAction {
220220
221221 if ( filename ) {
222222 url += `/${ encodeURIComponent ( filename ) } ` ;
223- text = `${ fileSize } < ${ url } > ` ;
223+ text = `${ url } ${ fileSize } ` ;
224224 }
225225 else {
226226 fileSize = fileSize ? ` ${ fileSize } ` : "" ;
227227 // If not a filename, print the body
228- text = `${ event . content . body } ${ fileSize } < ${ url } > ` ;
228+ text = `${ url } ${ event . content . body } ${ fileSize } ` ;
229229 }
230230 }
231231 }
You can’t perform that action at this time.
0 commit comments