From a71492faa8fbbbb9bf386d76533d69b61b12f99d Mon Sep 17 00:00:00 2001 From: cage Date: Sun, 24 Dec 2023 22:22:57 +0100 Subject: [PATCH] - [GUI] fixed test for checking mime-type on an image; - allowed null values for preview url in post's attachments. --- src/db.lisp | 2 +- src/gui/client/main-window.lisp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/db.lisp b/src/db.lisp index a6905c2..b0027ff 100644 --- a/src/db.lisp +++ b/src/db.lisp @@ -295,7 +295,7 @@ ;; one of swconf:*allowed-attachment-type* " type TEXT NOT NULL," " url TEXT NOT NULL," - " \"preview-url\" TEXT NOT NULL," + " \"preview-url\" TEXT," " \"remote-url\" TEXT," ;; url shortened " \"text-url\" TEXT," diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 496c667..6ac76eb 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -474,7 +474,9 @@ (let ((image (cond ((string= mime-type +mime-type-jpg+) (scale-jpeg main-window file-path)) - ((member mime-type '("image/x-tga" "image/x-targa")) + ((member mime-type + '("image/x-tga" "image/x-targa") + #'string=) (scale-targa main-window file-path)) ((string= mime-type +mime-type-png+) (scale-png main-window file-path))