From 6ec8d2f201199f536f8dc80cdb4aed6ff0472897 Mon Sep 17 00:00:00 2001 From: sgtdeagle <46221457+sgtdeagle@users.noreply.github.com> Date: Thu, 7 May 2026 14:27:31 +0000 Subject: [PATCH] change email attachmentname to peerName if not empty --- src/dashboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dashboard.py b/src/dashboard.py index e4d4eefb..93d69c93 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1511,7 +1511,8 @@ def API_Email_Send(): subject = Template(data.get('Subject', '')).render(peer=p.toJson(), configurationFile=download) if data.get('IncludeAttachment', False): u = str(uuid4()) - attachmentName = f'{u}.conf' + peerName = p.toJson().get('name', '').strip() + attachmentName = f'{peerName if peerName else u}.conf' with open(os.path.join('./attachments', attachmentName,), 'w+') as f: f.write(download['file'])