Skip to content

Commit 2e98510

Browse files
committed
Fixed author links
1 parent 5f38959 commit 2e98510

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.
77
however, insignificant breaking changes does not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319).
88

99

10-
# v3.3.0-dev3
10+
# v3.3.0-dev4
1111

1212

1313
### Important
@@ -32,6 +32,10 @@ however, insignificant breaking changes does not guarantee a major version bump,
3232

3333
- `?contact` no longer send the "thread created" message to where the command is ran, instead, it's now sent to the newly created thread channel. (Thanks to DAzVise)
3434
- Automatically delete notes command `?note` when there's no attachments attached.
35+
- Embed author links used to be inaccessible in many cases, now:
36+
- `?anonreply`, `?reply`, and `?note` in thread channel will link to the sender's profile.
37+
- `?reply` and recipient's DM will also link the sender's profile.
38+
- `?anonreply` in DM channel will link to the first channel of the main guild.
3539
- Plugins update (mostly internal).
3640
- `git` is no longer used to install plugins, it now downloads through zip files.
3741
- `?plugins enabled` renamed to `?plugins loaded` while `enabled` is still an alias to that command.

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.3.0-dev3"
1+
__version__ = "3.3.0-dev4"
22

33
import asyncio
44
import logging

core/thread.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -647,18 +647,19 @@ async def send(
647647
avatar_url = self.bot.config["anon_avatar_url"]
648648
if avatar_url is None:
649649
avatar_url = self.bot.guild.icon_url
650+
embed.set_author(name=name, icon_url=avatar_url,
651+
url=f"https://discordapp.com/channels/{self.bot.guild.id}")
650652
else:
651653
# Normal message
652654
name = str(author)
653655
avatar_url = author.avatar_url
654-
655-
embed.set_author(name=name, icon_url=avatar_url, url=message.jump_url)
656+
embed.set_author(name=name, icon_url=avatar_url, url=f"https://discordapp.com/users/{author.id}")
656657
else:
657658
# Special note messages
658659
embed.set_author(
659660
name=f"Note ({author.name})",
660661
icon_url=system_avatar_url,
661-
url=message.jump_url,
662+
url=f"https://discordapp.com/users/{author.id}"
662663
)
663664

664665
ext = [(a.url, a.filename) for a in message.attachments]

0 commit comments

Comments
 (0)