This allows users to define handle_in/2 in their robot module
in order to handle any message no handled by the adapter.
Example:
defmodule MyApp.Robot do
use Hedwig.Robot, otp_app: :my_app
def handle_in({:some_message, msg}, robot) do
# do something with the message ...
# must return `{:ok, robot}`.
# `robot` here is the state of the Robot.
{:ok, robot}
end
end
Coverage decreased (-0.4%) to 87.006% when pulling 0af5af60ec236b58205cc8b4d4f6b42c9e57be67 on scrogson:handle_in into 2645dedc4a133d56bb417227302ea1337b3f2b0e on hedwig-im:master.
This allows users to define
handle_in/2
in their robot module in order to handle any message no handled by the adapter.Example: