-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nadia.send_message fix spec #79
base: master
Are you sure you want to change the base?
Conversation
@@ -39,7 +39,7 @@ defmodule Nadia do | |||
force a reply from the user - `Nadia.Model.ReplyKeyboardMarkup` or | |||
`Nadia.Model.ReplyKeyboardHide` or `Nadia.Model.ForceReply` | |||
""" | |||
@spec send_message(integer, binary, [{atom, any}]) :: {:ok, Message.t()} | {:error, Error.t()} | |||
@spec send_message(integer | binary, binary, [{atom, any}]) :: {:ok, Message.t()} | {:error, Error.t()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @dog-64 , just curious, this is kind of a significant change, what stays behind it could you please give more details? thanks a lot!
Hi
can we communicate in russian?
About PR:
I can use:
Nadia.send_message("@StarsOfAwesomeElixir", "bot test")
But in dialyzer tests:
lib/awe2/db/git_telegram.ex:77: The call 'Elixir.Nadia':send_message(#{#<64>(8, 1, 'integer', ['unsigned', 'big']), #<83>(8, 1, 'integer', ['unsigned', 'big']), #<116>(8, 1, 'integer', ['unsigned', 'big']), #<97>(8, 1, 'integer', ['unsigned', 'big']), #<114>(8, 1, 'integer', ['unsigned', 'big']), #<115>(8, 1, 'integer', ['unsigned', 'big']), #<79>(8, 1, 'integer', ['unsigned', 'big']), #<102>(8, 1, 'integer', ['unsigned', 'big']), #<65>(8, 1, 'integer', ['unsigned', 'big']), #<119>(8, 1, 'integer', ['unsigned', 'big']), #<101>(8, 1, 'integer', ['unsigned', 'big']), #<115>(8, 1, 'integer', ['unsigned', 'big']), #<111>(8, 1, 'integer', ['unsigned', 'big']), #<109>(8, 1, 'integer', ['unsigned', 'big']), #<101>(8, 1, 'integer', ['unsigned', 'big']), #<69>(8, 1, 'integer', ['unsigned', 'big']), #<108>(8, 1, 'integer', ['unsigned', 'big']), #<105>(8, 1, 'integer', ['unsigned', 'big']), #<120>(8, 1, 'integer', ['unsigned', 'big']), #<105>(8, 1, 'integer', ['unsigned', 'big']), #<114>(8, 1, 'integer', ['unsigned', 'big'])}#,_text@1::binary(),[{'parse_mode',<<_:32>>},...]) breaks the contract (integer(),binary(),[{atom(),any()}]) -> {'ok','Elixir.Nadia.Model.Message':t()} | {'error','Elixir.Nadia.Model.Error':t()}
lib/mix/vup.ex:1: Callback info about the 'Elixir.Mix.Task' behaviour is not available
May by change of send_message to
@SPEC send_message(integer | binary, binary, [{atom, any}]) :: {:ok, Message.t()} | {:error, Error.t()}
will solve this problem?
Oleg Duletsky
11 окт. 2018 г., 14:45 +0200, Alex Filatov <notifications@github.com>, писал:
… @alexfilatov commented on this pull request.
In lib/nadia.ex:
> @@ -39,7 +39,7 @@ defmodule Nadia do
force a reply from the user - `Nadia.Model.ReplyKeyboardMarkup` or
`Nadia.Model.ReplyKeyboardHide` or `Nadia.Model.ForceReply`
"""
- @SPEC send_message(integer, binary, [{atom, any}]) :: {:ok, Message.t()} | {:error, Error.t()}
+ @SPEC send_message(integer | binary, binary, [{atom, any}]) :: {:ok, Message.t()} | {:error, Error.t()}
hey @dog-64 , just curious, this is kind of a significant change, what stays behind it could you please give more details? thanks a lot!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
yeah, this makes sense for me now, thanks! |
According to the documentation of telegram api, it's integer or string, so it makes sense this change 😄 https://core.telegram.org/bots/api#available-methods P.S: I prefer English, I have no idea of Russian 😂 |
11 окт. 2018 г., 15:05 +0200, Rock Neurotiko (Miguel G) <notifications@github.com>, писал:
According to the documentation of telegram api, it's integer or string, so it makes sense this change 😄
my tests will be happy
https://core.telegram.org/bots/api#available-methods
P.S: I prefer English, I have no idea of Russian 😂
Sorry, message about Russian for Alex Filatov
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, @dog-64 Thanks for contributing. It seems your changes failed to pass the format check. Would you please look into it? |
No description provided.