@@ -1004,6 +1004,7 @@ class Base {
1004
1004
quotedEventId,
1005
1005
quotedUserId,
1006
1006
quotedText,
1007
+ myUserId,
1007
1008
html
1008
1009
} = thirdPartyRoomMessageData ;
1009
1010
@@ -1017,15 +1018,21 @@ class Base {
1017
1018
//TODO: do this the correct way
1018
1019
if ( quotedEventId != null && quotedUserId != null && quotedText != null && this . bridge . getEventStore ( ) ) {
1019
1020
const quotedUserIntent = await this . getIntentFromThirdPartySenderId ( quotedUserId ) ;
1020
- const quotedUser = quotedUserIntent . client . credentials . userId ;
1021
+ let quotedUser = quotedUserIntent . client . credentials . userId ;
1022
+ let quotedEventEntry = await this . bridge . getEventStore ( ) . getEntryByRemoteId ( quotedEventId , quotedUserId ) ;
1023
+ if ( myUserId == quotedUserId ) {
1024
+ quotedUser = this . puppet . getClient ( ) . credentials . userId ;
1025
+ }
1021
1026
//Get event and roomId from the eventstore to look for the quote
1022
- const quotedEventEntry = await this . bridge . getEventStore ( ) . getEntryByRemoteId ( quotedEventId , quotedUserId ) ;
1023
1027
if ( quotedEventEntry != null && quotedUser != null ) {
1024
1028
const quoteMatrixRoomId = quotedEventEntry . getMatrixRoomId ( ) ;
1025
1029
const quoteMatrixEventId = quotedEventEntry . getMatrixEventId ( ) ;
1026
1030
html = this . formatTextToQuote ( quoteMatrixRoomId , quoteMatrixEventId , quotedUser , quotedText , text ) ;
1027
1031
text = "> <" + quotedUser + "> " + quotedText + "\\n \\n" + text ;
1028
1032
}
1033
+ else {
1034
+ info ( "Did not find event for" , quotedEventId , quotedUserId ) ;
1035
+ }
1029
1036
}
1030
1037
1031
1038
let tag = autoTagger ( senderId , this ) ;
0 commit comments