Closed Sandarr95 closed 4 years ago
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: https://github.com/Otann/morse/blob/35ced7195428474dd7e1567c2051baed42f36fbc/src/morse/handlers.clj#L56
(if-let [data (get-in update path)]
Hopefully you agree, if I have overlooked something let me know.
Sander
Fixed in https://github.com/Otann/morse/commit/895271d7d6b176eee753c18cf0cd2b1bde4c56cc
Hi,
I want to use a feature of the api which doesn't have an explicit handler, luckily I can just:
But then I noticed my function still got called on normal messages. I propose therefore a change: https://github.com/Otann/morse/blob/35ced7195428474dd7e1567c2051baed42f36fbc/src/morse/handlers.clj#L56
Hopefully you agree, if I have overlooked something let me know.
Sander