tweaks
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
config/*
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
@@ -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.
Reference in New Issue
Block a user