Update handler
Closed this issue · 1 comments
Sandarr95 commented
Hi,
I want to use a feature of the api which doesn't have an explicit handler, luckily I can just:
(h/update-fn [:chosen_inline_result]
(fn [{:keys [inline_message_id query]}]
(println "Registering " inline_message_id "\n" query)
(k/assoc-in db [inline_message_id] (register-question query))))
But then I noticed my function still got called on normal messages. I propose therefore a change:
Line 56 in 35ced71
(if-let [data (get-in update path)]
Hopefully you agree, if I have overlooked something let me know.
Sander