Skip to content

Commit b2a8e49

Browse files
committed
Stricter fallback genesis embed search
1 parent a899786 commit b2a8e49

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
# v2.17.1
9+
10+
### Changed
11+
12+
- Stricter fallback genesis embed search. This update shouldn't affect anyone.
13+
14+
### Info
15+
How modmail checks if a channel is a thread:
16+
17+
1. First the bot checks if the channel topic is in the format `User ID: xxxx`, this means it is a thread.
18+
2. If a channel topic is not found, the bot searches through message history of a channel to find the thread creation embed. This step should never yield a thread for a normal user, but in the case of a another bot messing up the channel topic (happened to a user before) this extra step was added.
19+
20+
821
# v2.17.0
922

1023
### What's new?

bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.17.0'
25+
__version__ = '2.17.1'
2626

2727
import asyncio
2828
import logging

core/thread.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ async def _find_from_channel(self, channel):
627627
elif channel.topic is None:
628628
try:
629629
async for message in channel.history(limit=100):
630+
if message.author != self.bot.user:
631+
continue
630632
if message.embeds:
631633
embed = message.embeds[0]
632634
if embed.footer.text:

0 commit comments

Comments
 (0)