Skip to content

Commit bdbebff

Browse files
committed
Merge branch 'development'
2 parents 35f24ee + 80010ca commit bdbebff

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
77
however, insignificant breaking changes do not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319). If you're a plugin developer, note the "BREAKING" section.
88

9+
# v3.8.1
10+
11+
### Fixed
12+
13+
- Additional image uploads now render properly. ([PR #2933](https://github.com/kyb3r/modmail/pull/2933)))
14+
- `confirm_thread_creation` no longer raises unnecessary errors. ([GH #2931](https://github.com/kyb3r/modmail/issues/2931), [PR #2933](https://github.com/kyb3r/modmail/pull/2933))
15+
- Autotriggers no longer sends attachments back. ([GH #2932](https://github.com/kyb3r/modmail/issues/2932))
16+
17+
918
# v3.8.0
1019

1120
### Added

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.8.0"
1+
__version__ = "3.8.1"
22

33

44
import asyncio

core/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ class DummyMessage:
227227
"""
228228

229229
def __init__(self, message):
230+
message.attachments = []
230231
self._message = message
231232

232233
def __getattr__(self, name: str):

core/thread.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ async def delete_message(
658658
await asyncio.gather(*tasks)
659659

660660
async def find_linked_message_from_dm(self, message, either_direction=False):
661-
if either_direction and message.embeds:
661+
if either_direction and message.embeds and message.embeds[0].author.url:
662662
compare_url = message.embeds[0].author.url
663663
compare_id = compare_url.split("#")[-1]
664664
else:
@@ -915,9 +915,9 @@ async def send(
915915
additional_count = 1
916916

917917
for url, filename, is_sticker in images:
918-
if not prioritize_uploads or (
919-
(url is None or is_image_url(url)) and not embedded_image and filename
920-
):
918+
if (
919+
not prioritize_uploads or ((url is None or is_image_url(url)) and filename)
920+
) and not embedded_image:
921921
if url is not None:
922922
embed.set_image(url=url)
923923
if filename:
@@ -930,7 +930,7 @@ async def send(
930930
else:
931931
embed.add_field(name="Image", value=f"[{filename}]({url})")
932932
embedded_image = True
933-
elif filename is not None:
933+
else:
934934
if note:
935935
color = self.bot.main_color
936936
elif from_mod:
@@ -940,11 +940,11 @@ async def send(
940940

941941
img_embed = discord.Embed(color=color)
942942

943-
if url is None:
943+
if url is not None:
944944
img_embed.set_image(url=url)
945945
img_embed.url = url
946-
947-
img_embed.title = filename
946+
if filename is not None:
947+
img_embed.title = filename
948948
img_embed.set_footer(text=f"Additional Image Upload ({additional_count})")
949949
img_embed.timestamp = message.created_at
950950
additional_images.append(destination.send(embed=img_embed))

0 commit comments

Comments
 (0)