1
0
Fork 0

- fixed chat api;

- fixed regression, loading scripts works again.
This commit is contained in:
cage 2021-03-14 13:26:06 +01:00
parent b1eb1a2664
commit 4d2ac3a751
2 changed files with 6 additions and 5 deletions

View File

@ -48,12 +48,14 @@
(defgeneric get-all-chats (object &key &allow-other-keys))
(defmethod get-all-chats ((object tooter:client) &key (accum ()))
(defmethod get-all-chats ((object tooter:client) &key (min-id nil) (accum ()))
"Get a list of all chats, ordered from the more recent updated."
(let ((chats (api-client:sort-id< (get-chats-list object))))
(let ((chats (api-client:sort-id< (get-chats-list object :min-id min-id))))
(if chats
(let ((new-min-id (tooter:id (last-elt chats))))
(get-all-chats object object new-min-id (append chats accum)))
(let ((new-min-id (chat-id (last-elt chats))))
(get-all-chats object
:min-id new-min-id
:accum (append chats accum)))
(api-client:sort-id< accum))))
(defgeneric post-chat-message (object chat-id content media))

View File

@ -176,7 +176,6 @@ etc.) happened"
(defun load-script-file ()
"Load (execute) a lisp file used in requests of a command line switch"
(setf program-events:*process-events-immediately* t)
(load-configuration-files)
(init-db)
(db-utils:with-ready-database (:connect nil)
(client:init)