rockneurotiko / ex_gram

Telegram Bot API low level API and framework
182 stars 26 forks source link

Help with code needed - Tesla adapter `handle_result` #69

Closed TwistingTwists closed 3 years ago

TwistingTwists commented 3 years ago

code from repo

https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/adapter/tesla.ex#L53

question

Does this function get a call ever? The function above it would always match some status. So the flow enters the function define above L53.

concept check

In my understanding of pattern matching in function arguments -> if pattern matched, all other definitions (below) current one are ignored, right?

EDIT : concept was NOT ok. when {:ok, :true} does not match, function below is called.

suggestions - what am I missing?

Resolved (see Edit)