GNU bug report logs -
#70871
[PATCH] Show avatars from Libravatar.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#70871: [PATCH] Show avatars from Libravatar.
which was filed against the mumi package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 70871 <at> debbugs.gnu.org.
--
70871: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70871
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi Noé,
Sorry for the long wait! I have pushed the patches with a few
modifications. Most significantly, I am defaulting to an identicon
instead of a 404. That way, we don't have to use the alt text as a
makeshift avatar. And, we get unique identicon avatars even if the first
letter of two people's names is the same.
With this patchset, we are now dependent on an external service for our
avatars. We should probably cache these avatars. But for now, maybe we
can just hope that the external service holds up! And, we should ideally
implement DNS lookups in guile-avatar to support federation. That's a
little project if you're up for it. ;-) Maybe the guile-dns library is
useful in this regard.
I'll redeploy the mumi instance on issues.guix.gnu.org in a day or so.
Thank you for your patience!
Arun
[Message part 3 (message/rfc822, inline)]
Requires guile-avatar from here:
https://codeberg.org/lechner/guile-avatar
The packaging code for guile-avatar can be added to Guix by accepting
this patch:
https://debbugs.gnu.org/70870
In Guix, the package should then be mentioned as an "input" to mumi,
together with an updated commit hash or version for mumi.
A live preview of this change is available at:
https://patchwise.org/38809
---
mumi/web/view/html.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm
index 2275799..bd5caec 100644
--- a/mumi/web/view/html.scm
+++ b/mumi/web/view/html.scm
@@ -19,6 +19,7 @@
;;; <http://www.gnu.org/licenses/>.
(define-module (mumi web view html)
+ #:use-module (avatar url)
#:use-module (email email)
#:use-module (mumi config)
#:use-module (mumi debbugs)
@@ -451,12 +452,12 @@ failed to process associated messages.")
,(map (match-lambda
((message-number message)
`(li
- (div
- (@ (class "avatar")
- (style ,(string-append "background-color:"
- (avatar-color (sender-email message)
- (map extract-email parties)))))
- ,(string-upcase (string-take (sender-name message) 1)))
+ (img (@ (class "avatar")
+ (style ,(string-append "background-color:"
+ (avatar-color (sender-email message)
+ (map extract-email parties))))
+ (src ,(libravatar-url (sender-email message) #:default "404"))
+ (alt ,(string-upcase (string-take (sender-name message) 1)))))
(span (@ (class "date"))
(a (@ (href ,(string-append "#" (number->string
message-number))))
@@ -621,12 +622,12 @@ currently disabled."))
(id ,(number->string message-number))))
(a (@ (class "message-anchor")
(id ,(format #false "msgid-~a" (msgid-hash (message-id message))))))
- (div
- (@ (class "avatar")
- (style ,(string-append "background-color:"
- (avatar-color (sender-email message)
- (map extract-email parties)))))
- ,(string-upcase (string-take (sender-name message) 1)))
+ (img (@ (class "avatar")
+ (style ,(string-append "background-color:"
+ (avatar-color (sender-email message)
+ (map extract-email parties))))
+ (src ,(libravatar-url (sender-email message) #:default "404"))
+ (alt ,(string-upcase (string-take (sender-name message) 1)))))
(article
(@ (class "message"))
(header
base-commit: 394c90d4a176756b9f0f4a716a2646ab98d8f167
--
2.41.0
This bug report was last modified 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.