1
0
Просмотр исходного кода

Fix vk.lisp dep, prevent repeated handling of message raising condition

Innocenty Enikeew 10 лет назад
Родитель
Сommit
20a31b8849
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      chatikbot.asd
  2. 2 2
      chatikbot.lisp

+ 1 - 0
chatikbot.asd

@@ -18,4 +18,5 @@
                (:file "twitter")
                (:file "twitter")
                (:file "telegram")
                (:file "telegram")
                (:file "forecast")
                (:file "forecast")
+               (:file "vk")
                (:file "chatikbot")))
                (:file "chatikbot")))

+ 2 - 2
chatikbot.lisp

@@ -16,10 +16,10 @@
       (loop for update in (telegram-get-updates :offset (and *telegram-last-update*
       (loop for update in (telegram-get-updates :offset (and *telegram-last-update*
                                                              (1+ *telegram-last-update*))
                                                              (1+ *telegram-last-update*))
                                                 :timeout 300)
                                                 :timeout 300)
-         do (handle-message (aget "message" update))
          do (setf *telegram-last-update*
          do (setf *telegram-last-update*
                   (max (or *telegram-last-update* 0)
                   (max (or *telegram-last-update* 0)
-                       (aget "update_id" update))))
+                       (aget "update_id" update)))
+         do (handle-message (aget "message" update)))
     (error (e)
     (error (e)
       (log:error e))))
       (log:error e))))