Now with sawato life chat
This commit is contained in:
parent
7ff94b59a8
commit
00ef1d1f4b
2 changed files with 31 additions and 13 deletions
17
main.py
17
main.py
|
|
@ -2017,7 +2017,22 @@ async def ws_receive_snapshots(
|
|||
)
|
||||
logger.info(f"New portal discovered: {portal_name} at {ns_rounded}, {ew_rounded} by {character_name}")
|
||||
else:
|
||||
logger.debug(f"Portal already exists at {ns_rounded}, {ew_rounded}")
|
||||
# Update timestamp for existing portal to keep it alive
|
||||
await database.execute(
|
||||
"""
|
||||
UPDATE portals
|
||||
SET discovered_at = :timestamp, discovered_by = :character_name
|
||||
WHERE ROUND(ns::numeric, 2) = :ns_rounded
|
||||
AND ROUND(ew::numeric, 2) = :ew_rounded
|
||||
""",
|
||||
{
|
||||
"timestamp": timestamp,
|
||||
"character_name": character_name,
|
||||
"ns_rounded": ns_rounded,
|
||||
"ew_rounded": ew_rounded
|
||||
}
|
||||
)
|
||||
logger.info(f"Portal timestamp updated: {portal_name} at {ns_rounded}, {ew_rounded} by {character_name}")
|
||||
|
||||
# Broadcast to browser clients for map updates
|
||||
await _broadcast_to_browser_clients(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue