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

Commit

Permalink
Merge pull request #241 from gloomy-ghost/allow_thread_without_prefix
Browse files Browse the repository at this point in the history
Allow threaded query without prefix, fixes #133
  • Loading branch information
bertybuttface authored Nov 8, 2023
2 parents 3b18d22 + e65461c commit 4e6dec8
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 4e6dec8

Please sign in to comment.