Github messages for mblaze
 help / color / mirror / Atom feed
* [PR PATCH] Attach all files when forwarding in raw mode
@ 2023-11-11  2:07 rakoo
  2023-11-24 12:54 ` [PR PATCH] [Updated] " rakoo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rakoo @ 2023-11-11  2:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

There is a new pull request by rakoo against master on the mblaze repository

https://github.com/rakoo/mblaze mfwd_attachments
https://github.com/leahneukirchen/mblaze/pull/252

Attach all files when forwarding in raw mode
I want to use forwarding with raw messages because it's just easier to work with from the point of view of receivers. The problem is that when "flattening" the message, attachments are lost. This PR extracts them in a temporary folder and adds them to the message to be sent

A patch file from https://github.com/leahneukirchen/mblaze/pull/252.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mfwd_attachments-252.patch --]
[-- Type: text/x-diff, Size: 798 bytes --]

From f17006eeb909f2a881ebf155485c3fb703fc5825 Mon Sep 17 00:00:00 2001
From: Matthieu Rakotojaona <m@rako.space>
Date: Sat, 11 Nov 2023 02:01:19 +0100
Subject: [PATCH] Attach all files when forwarding in raw mode

---
 mcom | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/mcom b/mcom
index 4e834c6..7981f65 100755
--- a/mcom
+++ b/mcom
@@ -306,6 +306,18 @@ fi
 		msgid
 		museragent
 		cat "$MBLAZE/headers" 2>/dev/null
+		if [ -n "$raw" ]; then
+			prev=$(pwd)
+			attachdir=$(mktemp -d)
+			cd $attachdir
+			mseq -r "$@" \
+				| xargs -I {} mshow -Bx {} \
+				| IFS=$NL xargs realpath \
+				| sed 's/^/Attach: /'
+			cd $prev
+			trap 'rm -r "$attachdir"' EXIT
+		fi
+
 		printf '\n\n'
 		if [ -z "$raw" ]; then
 			mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-24 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11  2:07 [PR PATCH] Attach all files when forwarding in raw mode rakoo
2023-11-24 12:54 ` [PR PATCH] [Updated] " rakoo
2024-04-24 16:56 ` rakoo
2024-04-24 16:57 ` rakoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).