Conversation
|
@Sandarr95 Are you can create a unittest? |
Otann
left a comment
There was a problem hiding this comment.
Finally (in 2 years!) got to read about the naming behind this PR and really liked it.
It needs some polishing, maybe you can do it if you have time and energy, or I'd do it soon.
| Q-Codes in Morse are shorthands for common patterns. `morse.qcodes/direct-reply` & `morse.qcodes/req-morse` are the Q-Codes already available. Here is an example usage of both. | ||
|
|
||
| ```clojure | ||
| (ns look.anotherbadlynamedns |
There was a problem hiding this comment.
the rest of the docs uses slightly different style of imports
| [morse.handlers :as h] | ||
| [somehttpserver :as http])) | ||
|
|
||
| (def token "") |
There was a problem hiding this comment.
Also the is no need repeat what was there before
| @@ -0,0 +1,11 @@ | |||
| {:paths ["src"] | |||
There was a problem hiding this comment.
it is quite confusing to have two sources of dependencies, because people would need to keep them both up to date
There was a problem hiding this comment.
I forgot about this PR as well, this was added to do some troubleshooting. I'll look into fixing up this PR again next weekend.
| #{(s/tuple "getMe" ::getMe) | ||
| (s/tuple "sendMessage" ::sendMessage)}) | ||
|
|
||
| (s/def ::request |
There was a problem hiding this comment.
I don't see it used anywhere, maybe left here by mistake?
|
Cleaned this up in #56 |
I left it really simple for now, just 2 functions in qcodes.clj.
One will auto reply any text returned by the handler.
The other is middleware, causing the handler to work the same for polling and webhooks (and can also be made secure).
Let me know what you think.
Also had the idea to make a single function to start the bot, so if you provide a webhook it will use a server, but not sure how to make people choose what server they want to use.