Merge pull request #152 from cdwiegand/main

resolves issue of overriding command classes not honoring replies in channels

I had already implemented about 60% of this when your PR came in, so I adopted some of your pattern into my changes.
This commit is contained in:
Adam Gessaman
2026-04-11 19:01:23 -07:00
committed by GitHub
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -617,9 +617,9 @@ class MultitestCommand(BaseCommand):
return self.translate('commands.multitest.help', fallback="Listens for 6 seconds and collects all unique paths from incoming messages")
def matches_keyword(self, message: MeshMessage) -> bool:
"""Check if message matches multitest keyword"""
"""Check if message matches multitest keyword"""
content_lower = self.cleanup_message_for_matching(message)
# Check for exact match or keyword followed by space
for keyword in self.keywords:
if content_lower == keyword or content_lower.startswith(keyword + ' '):
+1 -1
View File
@@ -181,7 +181,7 @@ class PathCommand(BaseCommand):
def matches_keyword(self, message: MeshMessage) -> bool:
"""Check if message starts with 'path' keyword or 'p' shortcut (if enabled)"""
content_lower = self.cleanup_message_for_matching(message)
# Handle "p" shortcut if enabled
if self.enable_p_shortcut:
if content_lower == "p":
+1 -1
View File
@@ -134,7 +134,7 @@ class PrefixCommand(BaseCommand):
def matches_keyword(self, message: MeshMessage) -> bool:
"""Check if message starts with 'prefix' keyword"""
content_lower = self.cleanup_message_for_matching(message)
content_lower = self.cleanup_message_for_matching(message)
return content_lower == 'prefix' or content_lower.startswith('prefix ')
async def _parse_location_to_lat_lon(self, location: str) -> tuple[Optional[float], Optional[float], Optional[str]]:
+1 -1
View File
@@ -74,7 +74,7 @@ class RollCommand(BaseCommand):
bool: True if the message matches the roll command syntax, False otherwise.
"""
content_lower = self.cleanup_message_for_matching(message)
# Check for exact "roll" match
if content_lower == "roll":
return True
+2 -2
View File
@@ -111,9 +111,9 @@ class SportsCommand(BaseCommand):
"""Check if this command matches the message content - sports must be first word"""
if not self.keywords:
return False
content_lower = self.cleanup_message_for_matching(message)
# Split into words and check if first word matches any keyword
words = content_lower.split()
if not words: