Skip to content

Commit 54782bd

Browse files
committed
Launch v2.7.1
1 parent 38bf314 commit 54782bd

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

config/config.factory.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ themecolor = 0x000000
55
voteurl =
66
tos_url =
77
beta = False
8-
ver = 2.7.0
8+
ver = 2.7.1
99
creator =
1010

1111
[intents]
@@ -188,6 +188,8 @@ changelog = > 1.0.0
188188
- This update was created in response to an independant security audit
189189
- Anon-IDs generation has been improved and is now more secure
190190
- Encryption for sensitive user data has been improved
191+
> 2.7.1
192+
- Added support for mentions in confession branding while in compact mode
191193
192194
[premium]
193195
icon =

extensions/confessions_common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,16 +800,18 @@ async def send_confession(
800800
# Send the confession
801801
if use_webhook:
802802
if webhook := await self.find_or_create_webhook(channel):
803+
mentions_in_preface = re.findall(r'<[@!&]+\d+>', preface)
803804
botcolour = self.bot.config['main']['themecolor'][2:]
804805
username = (
805-
(preface + ' - ' if preface else '') +
806+
(preface + ' - ' if preface and not mentions_in_preface else '') +
806807
(f'[Anon-{self.anonid}]' if self.channeltype.anonid else '[Anon]')
807808
)
808809
pfp = (
809810
self.config.get('pfpgen_url', '')
810811
.replace('{}', self.anonid if self.channeltype.anonid else botcolour)
811812
)
812-
func = webhook.send(self.content, username=username, avatar_url=pfp, **kwargs)
813+
content = ('> ' + preface + '\n' if mentions_in_preface else '') + self.content
814+
func = webhook.send(content, username=username, avatar_url=pfp, **kwargs)
813815
#TODO: add support for custom PFPs
814816
else:
815817
return False

0 commit comments

Comments
 (0)