Explorar el Código

[inline] fix empty rows of inline buttons

Innocenty Enikeev hace 6 años
padre
commit
6cae42f070
Se han modificado 1 ficheros con 8 adiciones y 8 borrados
  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*)))