Comments (4)
@jeffweiss I love this idea! I'll start thinking about an API for this.
from hedwig.
@scrogson I'm wondering if it would be possible to delegate somehow the message
to the adapter. As each service has its own types of messages. For example in telegram, to mention one, you can send keyboards.
I'm really asking, as a clarification for a doubt I have, I don't know if it's already in Hedwig. But I'd be a really nice API if not.
Currently at work we've developed something with AWS, kinda like a message gateway
, a main entry point for receiving and sending messages (for messenger, kik, line, twilio & telegram), but this delegates to the services or adapters of this services, thus we can send special keyboards, special images, or custom responses without having any kind of limitation.
We've been wanting to change it, completely rewrite it in Elixir, so we can take advantage of what it gives us, like amazing fault tolerance software it's built upon. We were looking around, investigating when we came upon Hedwig, and we really think it could be the answer we've been looking.
Thanks for your attention.
Hope I've explained myself.
from hedwig.
I'm wondering if it would be possible to delegate somehow the message to the adapter.
@behind-design what exactly do you have in mind?
The response messages do make their way back to the adapter which is responsible for transforming the %Hedwig.Message{}
into whatever is required for the underlying service.
from hedwig.
I was wondering if type
field on %Hedwig.Message{}
would be enough to distinguish if responder wants to send normal message or message with attachment (e.g. Slack 'message.attachment' type) or file. Adapters can use pattern matching to compose message needed for their specific messaging protocol.
Is this good idea? I am Elixir/Erlang beginner, so I am not sure if there is better/more idiomatic way how to solve this in Elixir.
from hedwig.
Related Issues (20)
- Support multiple configurations of the same adapter HOT 1
- Hedwig.whereis/1 not working HOT 2
- Can't compile responder when there are chinese characters in regular expression HOT 4
- Document return values from `handle_in/2`
- What is the recommended alternative to `ignore_from_self?` HOT 2
- how to test responders? HOT 2
- Process registration: `handle_connect` not being called? HOT 3
- Double supervision HOT 1
- Make Robot a real OTP behaviour HOT 4
- Making a tutorial / howto regarding adapters HOT 6
- A single message can trigger multiple responses HOT 6
- Crash when trying to create a secure connection HOT 3
- enter responder macro HOT 4
- hot code reload responders when in dev mode
- Use up and down arrows for history in console adapter HOT 1
- Reconnect does not work HOT 7
- `hedwig` package published on hex is out of date HOT 3
- Defining adapter-dependent actions HOT 2
- Support multiple AKA fields
- Ability to listen but not respond HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hedwig.