Browse Source

[inline] fix empty rows of inline buttons

Innocenty Enikeev 6 năm trước cách đây
mục cha
commit
6cae42f070
1 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 8 8
      inline.lisp

+ 8 - 8
inline.lisp

@@ -54,14 +54,14 @@
 (defun get-inline-keyboard (buttons &optional (chat-id *chat-id*))
   (telegram-inline-keyboard-markup
    (loop for row in buttons
-      when row
-      collect (loop for (text . callback) in row
-                 when text
-                 collect (list
-                          :text text
-                          :callback-data
-                          (encode-callback-data
-                           chat-id :inline (add-button callback) +ttl+))))))
+      when (loop for (text . callback) in row
+              when text
+              collect (list
+                       :text text
+                       :callback-data
+                       (encode-callback-data
+                        chat-id :inline (add-button callback) +ttl+)))
+      collect it)))
 
 (def-callback-section-handler cb-handle-inline (:inline)
   (let ((button (gethash (parse-integer *data*) *inline-buttons*)))