[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement a3e05a7cff: Fix: (ement-room-send-file) File size
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement a3e05a7cff: Fix: (ement-room-send-file) File size |
Date: |
Mon, 28 Aug 2023 03:58:00 -0400 (EDT) |
branch: externals/ement
commit a3e05a7cffb99ce25653a6815a57046c9d83f1a1
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Fix: (ement-room-send-file) File size
---
README.org | 1 +
ement-room.el | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index bc4d651230..3e02ce1a6a 100644
--- a/README.org
+++ b/README.org
@@ -302,6 +302,7 @@ Ement.el doesn't support encrypted rooms natively, but it
can be used transparen
*Fixes*
+ File event formatter assumed that file size metadata would be present (a
malformed, e.g. spam, event might not have it).
++ Send correct file size when sending files/images.
** 0.11
diff --git a/ement-room.el b/ement-room.el
index 56db775a93..a29bc7b0a6 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -1240,7 +1240,7 @@ otherwise use current room."
(extension (or (file-name-extension file) ""))
(mime-type (mailcap-extension-to-mime extension))
(data `(file ,file))
- (size (length data)))
+ (size (file-attribute-size (file-attributes file))))
(ement-upload session :data data :filename filename :content-type
mime-type
:then (lambda (data)
(message "Uploaded file %S. Sending message..." file)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/ement a3e05a7cff: Fix: (ement-room-send-file) File size,
ELPA Syncer <=