Closed derhackler closed 8 years ago
You'll have to give it a %Hedwig.Message{}
struct; the below works fine for me:
msg = %Hedwig.Message{
type: "groupchat",
room: "some_room_jid",
text: "hello world"
}
Databot.Robot.send(pid, msg)
Thanks for answering @jwarlander!
@derhackler let me know if this doesn't solve your issue.
Works perfectly! Thanks @jwarlander!
I documented this at work just a few days ago, so the information was already at my fingertips.. ;)
Hi,
I'm currently trying to build an agent, that is supposed to actively send messages to a HipChat room when certain EC2 instances are running that shouldn't run.
Replying works fine (in the responders), but how can I send a message via the agent actively? I tried:
Hedwig.Robot.send(pid, %{text: "hello world"})
This crashes my agent with a match error.
Best, Benedikt