events: Add support for processing modern presence event in web client.

This commit is contained in:
Vector73
2025-08-15 10:30:57 +00:00
committed by Tim Abbott
parent 396f4d004a
commit 92fbe47a3b
10 changed files with 72 additions and 69 deletions

View File

@@ -68,8 +68,9 @@ def get_event_checker(event: dict[str, Any]) -> Callable[[str, dict[str, Any]],
# Change to CamelCase
name = name.replace("_", " ").title().replace(" ", "")
# Use EventModernPresence type to check "presence" events
if name == "Presence":
name = "Legacy" + name
name = "Modern" + name
# And add the prefix.
name = "Event" + name