Skip to content

Commit 9d4813d

Browse files
committed
Changelog & Ghost errors are no longer raised when threads are created using non-organic methods.
1 parent 6b26e30 commit 9d4813d

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ however, insignificant breaking changes do not guarantee a major version bump, s
1212

1313
- `on_thread_initiate` and `on_thread_ready` events now have `thread, creator, category, initial_message` as additional arguments.
1414

15+
### Fixed
16+
17+
- `confirm_thread_creation` now properly works when a user opens a thread using react to contact. ([GH #2930](https://github.com/kyb3r/modmail/issues/2930), [PR #2971](https://github.com/kyb3r/modmail/pull/2971))
18+
- `?disable all/new` now disables react to contact threads. ([GH #2969](https://github.com/kyb3r/modmail/issues/2969), [PR #2971](https://github.com/kyb3r/modmail/pull/2971))
19+
- Ghost errors are no longer raised when threads are created using non-organic methods.
20+
1521
### Internal
1622

1723
- `thread.reply` now returns (msg_to_user, msg_to_thread). Can be useful in plugins.

core/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ class DummyMessage:
226226
"""
227227

228228
def __init__(self, message):
229-
message.attachments = []
229+
if message:
230+
message.attachments = []
230231
self._message = message
231232

232233
def __getattr__(self, name: str):

core/thread.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ class Author:
245245
await self.bot.api.update_note_ids(ids)
246246

247247
async def activate_auto_triggers():
248-
message = DummyMessage(copy.copy(initial_message))
249-
if message:
248+
if initial_message:
249+
message = DummyMessage(copy.copy(initial_message))
250250
try:
251251
return await self.bot.trigger_auto_triggers(message, channel)
252252
except RuntimeError:

0 commit comments

Comments
 (0)