@@ -98,11 +98,12 @@ class App extends MatrixPuppetBridgeBase {
98
98
const otherPeople = participantIds . filter ( pid => ! pid . match ( / ^ e : / ) ) ;
99
99
console . log ( 'filtered out myself' , otherPeople ) ;
100
100
return Promise . map ( otherPeople , ( senderId ) => {
101
- const ghost = this . getIntentFromThirdPartySenderId ( senderId ) ;
102
- return ghost . join ( matrixRoomId ) . then ( ( ) => {
103
- console . log ( 'joined ghost' , senderId ) ;
104
- } , ( err ) => {
105
- console . log ( 'failed to join ghost' , senderId , err ) ;
101
+ return this . getIntentFromThirdPartySenderId ( senderId ) . then ( ghost => {
102
+ return ghost . join ( matrixRoomId ) . then ( ( ) => {
103
+ console . log ( 'joined ghost' , senderId ) ;
104
+ } , ( err ) => {
105
+ console . log ( 'failed to join ghost' , senderId , err ) ;
106
+ } ) ;
106
107
} ) ;
107
108
} ) ;
108
109
} ) . catch ( err => {
@@ -148,7 +149,7 @@ class App extends MatrixPuppetBridgeBase {
148
149
149
150
sendImageMessageAsPuppetToThirdPartyRoomWithId ( id , { url, text } , matrixEvent ) {
150
151
const { sendGroupMessage, sendMessage } = this . client ;
151
- return download . getTempfile ( url ) . then ( ( { path} ) => {
152
+ return download . getTempfile ( url , { tagFilename : true } ) . then ( ( { path} ) => {
152
153
const img = path ;
153
154
return this . prepareToSend ( id , matrixEvent ) . then ( ( { isGroup, handles, service} ) => {
154
155
return isGroup ? sendGroupMessage ( handles , text , img ) : sendMessage ( id , service , text , img ) ;
@@ -169,9 +170,10 @@ class App extends MatrixPuppetBridgeBase {
169
170
] . join ( '\n' ) ) ;
170
171
} else if ( command === 'rename' ) {
171
172
const [ id , ...rest ] = body . split ( ' ' ) ;
172
- const ghost = this . getIntentFromThirdPartySenderId ( id ) ;
173
- return ghost . setDisplayName ( rest . join ( ' ' ) ) . then ( ( ) => { } , ( err ) => {
174
- reply ( err . stack ) ;
173
+ return this . getIntentFromThirdPartySenderId ( id ) . then ( ( ghost ) => {
174
+ return ghost . setDisplayName ( rest . join ( ' ' ) ) . then ( ( ) => { } , ( err ) => {
175
+ reply ( err . stack ) ;
176
+ } ) ;
175
177
} ) ;
176
178
} else {
177
179
reply ( 'unrecognized command: ' + bangcommand ) ;
0 commit comments