This commit is contained in:
2026-08-12 17:14:01 -05:00
parent 78f5297383
commit 7e3b3dff6d
11 changed files with 23 additions and 5 deletions
+2
View File
@@ -0,0 +1,2 @@
config/*
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -3,6 +3,7 @@ password: "zC1b9qCKT8Cv0D"
room_id: "!ajyOBbqoCIbBhEqNPU:matrix.org" # Magbot Testing Space
#room_id: "!HXiyYVEZOMRtkyvarN:jupiterbroadcasting.com" # Da Lunch
#room_id: "!gJYEKNllaubNlNkFIj:jupiterbroadcasting.com" # The Main Chat
# Da Lunch and The Main Chat each have their own config (daLunch.yaml, mainChat.yaml).
lookback_seconds: 86400 # 24 hours
lookback_limit: 400
dump_mode: True
+13
View File
@@ -0,0 +1,13 @@
username: "magbot"
password: "zC1b9qCKT8Cv0D"
#room_id: "!ajyOBbqoCIbBhEqNPU:matrix.org" # Magbot Testing Space
room_id: "!HXiyYVEZOMRtkyvarN:jupiterbroadcasting.com" # Da Lunch
#room_id: "!gJYEKNllaubNlNkFIj:jupiterbroadcasting.com" # The Main Chat
lookback_seconds: 86400 # 24 hours
lookback_limit: 400
dump_mode: True
dbName: ""
# vote_host: "agmninex.online" # Hostname where voting interface is accessible (e.g., "localhost", "example.com", "vote.mysite.xyz")
vote_host: "agmninex.online"
vote_path: "lunch" # URL slug for this room's voting page (http://<vote_host>:9081/<vote_path>)
vote_activity_hours: 6672 # Hours a user must have been active within to be eligible to vote
+2 -2
View File
@@ -1,8 +1,8 @@
username: "magbot"
password: "zC1b9qCKT8Cv0D"
room_id: "!ajyOBbqoCIbBhEqNPU:matrix.org" # Magbot Testing Space
#room_id: "!ajyOBbqoCIbBhEqNPU:matrix.org" # Magbot Testing Space
#room_id: "!HXiyYVEZOMRtkyvarN:jupiterbroadcasting.com" # Da Lunch
#room_id: "!gJYEKNllaubNlNkFIj:jupiterbroadcasting.com" # The Main Chat
room_id: "!gJYEKNllaubNlNkFIj:jupiterbroadcasting.com" # The Main Chat
lookback_seconds: 86400 # 24 hours
lookback_limit: 400
dump_mode: True
+5 -3
View File
@@ -9,7 +9,7 @@ import asyncio
import sqlite3
import time
import sys
from nio import AsyncClient, LoginResponse
from nio import AsyncClient, LoginResponse, RoomMessagesResponse, SyncResponse
from room import Room
@@ -78,7 +78,9 @@ class UserListManager:
return []
# Sync to get room state
await self.room.client.sync(timeout=3000)
sync_resp = await self.room.client.sync(timeout=3000)
if not isinstance(sync_resp, SyncResponse):
print(f"Sync failed: {sync_resp}")
# Get the room object
room_obj = self.room.client.rooms.get(self.room.config.room_id)
@@ -124,7 +126,7 @@ class UserListManager:
limit=batch_size
)
if not response.chunk:
if not isinstance(response, RoomMessagesResponse) or not response.chunk:
break
fetched += len(response.chunk)
Binary file not shown.