mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-18 08:20:35 +01:00
- [gemini] prevented crash when a gemlog changed certificate and post's list is refreshed.
This commit is contained in:
parent
26d9169d84
commit
4dae983197
@ -67,6 +67,7 @@ This function return the 'post-title' substring."
|
||||
(defun refresh (url)
|
||||
"Refresh gemlog entries that can be found at 'url'. The gemlog must
|
||||
be subscribed before (see: 'gemini-subscription:subcribe'"
|
||||
(handler-case
|
||||
(when-let* ((data (slurp-gemini-url url))
|
||||
(page (babel:octets-to-string data))
|
||||
(parsed (parse-gemini-file page))
|
||||
@ -83,4 +84,17 @@ be subscribed before (see: 'gemini-subscription:subcribe'"
|
||||
(target link)
|
||||
(link-post-title (name link))
|
||||
date
|
||||
nil)))))))
|
||||
nil))))))
|
||||
(gemini-client:gemini-tofu-error (e)
|
||||
(let ((host (gemini-client:host e)))
|
||||
(flet ((on-input-complete (maybe-accepted)
|
||||
(when (ui::boolean-input-accepted-p maybe-accepted)
|
||||
(db-utils:with-ready-database (:connect nil)
|
||||
(db:tofu-delete host)
|
||||
(refresh url)))))
|
||||
(ui:ask-string-input #'on-input-complete
|
||||
:prompt
|
||||
(format nil
|
||||
(_ "Host ~s signature changed! This is a potential security risk! Ignore this warning? [y/N] ")
|
||||
host)
|
||||
:priority program-events:+standard-event-priority+))))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user