Github messages for mblaze
 help / color / mirror / Atom feed
From: rakoo <rakoo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Attach all files when forwarding in raw mode
Date: Thu, 06 Jun 2024 13:24:06 +0200	[thread overview]
Message-ID: <20240606112406.79CDC2A783@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-fa6558a0-26e0-48f6-803f-f5a8af34f6a8-mblaze-252@inbox.vuxu.org>

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

There is an updated 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: 809 bytes --]

From 76ae3562037a98198c70db2a674ca405581a1bcf 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 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

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

      parent reply	other threads:[~2024-06-06 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11  2:07 [PR PATCH] " rakoo
2023-11-24 12:54 ` [PR PATCH] [Updated] " rakoo
2024-04-24 16:56 ` rakoo
2024-04-24 16:57 ` rakoo
2024-06-06 11:12 ` rakoo
2024-06-06 11:22 ` rakoo
2024-06-06 11:24 ` rakoo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240606112406.79CDC2A783@inbox.vuxu.org \
    --to=rakoo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).