mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-09 10:22:54 +02:00
fixMessagesCommand
thanks @mesb1 https://github.com/SpudGunMan/meshing-around/issues/200
This commit is contained in:
@@ -137,7 +137,7 @@ git clone https://github.com/spudgunman/meshing-around
|
||||
| Command | Description | |
|
||||
|---------|-------------|-
|
||||
| `askai` and `ask:` | Ask Ollama LLM AI for a response. Example: `askai what temp do I cook chicken` | ✅ |
|
||||
| `messages` | Replays the last messages heard, like Store and Forward | ✅ |
|
||||
| `messages` | Replays the last messages heard on device, like Store and Forward, returns the PublicChannel and Current | ✅ |
|
||||
| `readnews` | returns the contents of a file (news.txt, by default) via the chunker on air | ✅ |
|
||||
| `satpass` | returns the pass info from API for defined NORAD ID in config or Example: `satpass 25544,33591`| |
|
||||
| `wiki:` | Searches Wikipedia and returns the first few sentences of the first result if a match. Example: `wiki: lora radio` |
|
||||
|
||||
@@ -962,6 +962,10 @@ def handle_messages(message, deviceID, channel_number, msg_history, publicChanne
|
||||
else:
|
||||
response = ""
|
||||
for msgH in msg_history:
|
||||
# number of messages to return
|
||||
if len(response.split("\n"))/2 >= storeFlimit:
|
||||
break
|
||||
# if the message is for this deviceID and channel or publicChannel
|
||||
if msgH[4] == deviceID:
|
||||
if msgH[2] == channel_number or msgH[2] == publicChannel:
|
||||
response += f"\n{msgH[0]}: {msgH[1]}"
|
||||
|
||||
Reference in New Issue
Block a user