mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-01 04:26:47 +01:00
- used version 2 for get chats.
This commit is contained in:
parent
81e5c3eba1
commit
f03880a7cf
@ -46,22 +46,16 @@
|
||||
:offset offset
|
||||
:limits limits)))
|
||||
|
||||
(defgeneric get-all-chats-v2 (object min-id &key &allow-other-keys))
|
||||
(defgeneric get-all-chats (object &key &allow-other-keys))
|
||||
|
||||
(defmethod get-all-chats-v2 ((object tooter:client) min-id &key (accum ()))
|
||||
(defmethod get-all-chats ((object tooter:client) &key (accum ()))
|
||||
"Get a list of all chats, ordered from the more recent updated."
|
||||
(let ((chats (api-client:sort-id< (get-chats-list object))))
|
||||
(if chats
|
||||
(let ((new-min-id (tooter:id (last-elt chats))))
|
||||
(get-all-chats-v2 object object new-min-id (append chats accum)))
|
||||
(get-all-chats object object new-min-id (append chats accum)))
|
||||
(api-client:sort-id< accum))))
|
||||
|
||||
(defgeneric get-all-chats (object))
|
||||
|
||||
(defmethod get-all-chats ((object tooter:client))
|
||||
"Get a list of all chats, ordered from the more recent updated."
|
||||
(decode-chat (tooter:query object "/api/v1/pleroma/chats")))
|
||||
|
||||
(defgeneric post-chat-message (object chat-id content media))
|
||||
|
||||
(defun post-chat-path (chat-id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user