Skip to content

Commit 77e9ed3

Browse files
committed
Bug Fixes
1 parent 86ae74a commit 77e9ed3

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

docs/source/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ Glossary
3737
Releases
3838
---------------------
3939

40+
v3.0.4
41+
====================
42+
- Fixed AutoGUILD not working if the ``messages`` parameter is None.
43+
- Fixed ``verify_ssl`` being ignored on the WebSocket connection.
44+
45+
4046
v3.0.3
4147
====================
4248
- Fixed "Loading from JSON template causes live object reference to be lost".

src/daf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
from .remote import *
1818

1919

20-
VERSION = "3.0.3"
20+
VERSION = "3.0.4"

src/daf/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ async def add_object(obj, snowflake=None):
399399
raise ValueError("Account already added to the list")
400400

401401
if (res := await obj.initialize()) is not None:
402+
await obj._close()
402403
raise res
403404

404405
GLOBALS.accounts.append(obj)

src/daf/guild/autoguild.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ def __init__(
9797
invite_track: Optional[List[str]] = None,
9898
removal_buffer_length: int = 50
9999
) -> None:
100+
if messages is None:
101+
messages = []
102+
103+
if invite_track is None:
104+
invite_track = []
105+
100106
# Remove spaces around OR
101107
self.include_pattern = re.sub(r"\s*\|\s*", '|', include_pattern) if include_pattern else None
102108
self.exclude_pattern = re.sub(r"\s*\|\s*", '|', exclude_pattern) if exclude_pattern else None
@@ -113,9 +119,6 @@ def __init__(
113119
self._cache = []
114120
self._event_ctrl: EventController = None
115121

116-
if invite_track is None:
117-
invite_track = []
118-
119122
self._invite_join_count = {invite.split("/")[-1]: 0 for invite in invite_track}
120123
attributes.write_non_exist(self, "update_semaphore", asyncio.Semaphore(1))
121124
attributes.write_non_exist(self, "_removed_messages", [])

src/daf_gui/connector.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ async def _connect_ws(self):
242242
evt = daf.events.get_global_event_ctrl()
243243
try:
244244
trace("Connecting to live WebSocket connection.")
245-
async with self.session.ws_connect("/subscribe", auth=self.auth) as ws:
245+
additional_kwargs = {}
246+
if not self.verify_ssl:
247+
additional_kwargs["ssl"] = False
248+
249+
async with self.session.ws_connect("/subscribe", auth=self.auth, **additional_kwargs) as ws:
246250
trace("Connected to WebSocket.")
247251
async for message in ws:
248252
trace(f"WebSocket received {message.type}", TraceLEVELS.DEBUG)

0 commit comments

Comments
 (0)