Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Allow threaded query without prefix, fixes #133
Browse files Browse the repository at this point in the history
  • Loading branch information
gloomy-ghost committed Nov 5, 2023
1 parent 64fc3f2 commit 9dfe3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class CommandHandler {
if(relatesTo.event_id !== undefined){
const rootEvent: MessageEvent = await this.client.getEvent(roomId, relatesTo.event_id) // relatesTo is root event.
const rootPrefixUsed = prefixes.find(p => rootEvent.content.body.startsWith(p));
if (!rootPrefixUsed && !(!MATRIX_PREFIX_DM && isDm)) return false; // Ignore unrelated threads or certain dms
if (MATRIX_PREFIX && !rootPrefixUsed && !(!MATRIX_PREFIX_DM && isDm)) return false; // Ignore unrelated threads or certain dms
} else { // reply not thread, iterating for a prefix not implemented
return false; // Ignore if no relatesTo EventID
}
Expand Down

0 comments on commit 9dfe3e4

Please sign in to comment.