Skip to content

Commit d93740c

Browse files
committed
merge from master
2 parents a848847 + 022407e commit d93740c

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ All notable changes to this project will be documented in this file.
44
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

7-
# v2.17.1
7+
# v2.17.2
8+
9+
### Changed
10+
11+
- Logs search command will search through log keys as well now.
12+
- For example, `?logs search e7499e82f8ff`.
813

14+
# v2.17.1
915
### What's new?
1016

1117
Stricter fallback genesis embed search.
1218

13-
### What's changed?
19+
### Changed
1420
How modmail checks if a channel is a thread:
1521

1622
1. First the bot checks if the channel topic is in the format `User ID: xxxx`, this means it is a thread.
@@ -38,7 +44,7 @@ An issue where a scheduled close would not execute over a long period of time if
3844

3945
# v2.16.0
4046

41-
### What's changed?
47+
### Changed
4248

4349
All support for Modmail API (api.modmail.tk) has terminated.
4450
If you're still using api.modmail.tk, you will need to migrate to the self-hosted database

bot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

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

2727
import asyncio
2828
import logging
@@ -344,12 +344,12 @@ async def on_connect(self):
344344
async def setup_indexes(self):
345345
"""Setup text indexes so we can use the $search operator"""
346346
coll = self.db.logs
347-
index_name = 'messages.content_text_messages.author.name_text'
347+
index_name = 'messages.content_text_messages.author.name_text_key_text'
348348

349349
index_info = await coll.index_information()
350350

351351
# Backwards compatibility
352-
old_index = 'messages.content_text'
352+
old_index = 'messages.content_text_messages.author.name_text'
353353
if old_index in index_info:
354354
logger.info(info(f'Dropping old index: {old_index}'))
355355
await coll.drop_index(old_index)
@@ -359,7 +359,8 @@ async def setup_indexes(self):
359359
logger.info(info('Name: ' + index_name))
360360
await coll.create_index([
361361
('messages.content', 'text'),
362-
('messages.author.name', 'text')
362+
('messages.author.name', 'text'),
363+
('key', 'text')
363364
])
364365

365366
async def on_ready(self):

cogs/modmail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ async def contact(self, ctx,
620620

621621
@commands.command()
622622
@trigger_typing
623-
@checks.has_permissions(manage_channels=True)
623+
@checks.has_permissions(kick_members=True)
624624
async def blocked(self, ctx):
625625
"""Returns a list of blocked users"""
626626
embed = discord.Embed(title='Blocked Users',
@@ -653,7 +653,7 @@ async def blocked(self, ctx):
653653

654654
@commands.command()
655655
@trigger_typing
656-
@checks.has_permissions(manage_channels=True)
656+
@checks.has_permissions(kick_members=True)
657657
async def block(self, ctx, user: Optional[User] = None, *,
658658
after: UserFriendlyTime = None):
659659
"""
@@ -719,7 +719,7 @@ async def block(self, ctx, user: Optional[User] = None, *,
719719

720720
@commands.command()
721721
@trigger_typing
722-
@checks.has_permissions(manage_channels=True)
722+
@checks.has_permissions(kick_members=True)
723723
async def unblock(self, ctx, *, user: User = None):
724724
"""
725725
Unblocks a user from using Modmail.

0 commit comments

Comments
 (0)