Comments (3)
thanks @callowaylc. Pull request #44 should fix it, right?
from sachet.
Theoretically, it should, but I haven't tested it.
Browsing through cmd/sachet/main.go
and examples/config.yaml
, there seems to be a disconnect between the token definition, defined "in" config.telegram.token
, and the unmarshaling of the receiver object, which does not contain the bot token.
https://github.com/messagebird/sachet/blob/master/examples/config.yaml#L22-L23
https://github.com/messagebird/sachet/blob/master/examples/config.yaml#L40-L43
Unless I am mistaken, when we unmarshal the receiver, it shouldn't contain the token.
https://github.com/messagebird/sachet/blob/master/cmd/sachet/main.go#L50-L55
Which if the case, token will not be present there.
https://github.com/messagebird/sachet/pull/44/files#diff-f0743f22c708ff8f49227a99aa165690R19
from sachet.
Nice that you spent time looking!
The thing is that I think it works :-D
Right at the beginning of the handler we get the receiver name from the request (call to receiverConfByReceiver
):
https://github.com/messagebird/sachet/blob/master/cmd/sachet/main.go#L50
With the receiverConf
we do providerByName
. There is a simple switch and here
https://github.com/messagebird/sachet/blob/master/cmd/sachet/main.go#L152 you see we instantiating a telegram.Telegram
passing the config.Providers.Telegram
that has the token!
Back in main we use that provider by calling Send
on it https://github.com/messagebird/sachet/blob/master/cmd/sachet/main.go#L96
all should work :-D
from sachet.
Related Issues (20)
- SMS does not contain expected text HOT 1
- Build binaries for various OS HOT 1
- Release 0.3.0 ? HOT 8
- Sending messages via Infobip supports only one number
- Feature request: Please add TextMagic as a provider HOT 2
- Remove fmt.Print and etc.
- logs during outage
- [CVE Report]: messagebird/sachet:0.2.6 HOT 2
- Add HTTP_PROXY to telegram provider HOT 3
- Jasmin SMS gateway support (or SMPP protocol support) HOT 1
- [email protected] HOT 1
- Bad request Telegram: group chat was upgraded to a supergroup chat
- Secret Injection
- installtion error HOT 1
- [CVE Report]: messagebird/sachet:0.2.3 HOT 6
- Problem with config HOT 1
- PR approval request
- Context deadline exceeded HOT 1
- Please include a changelog in future releases
- github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.164: unknown revision v3.0.164 HOT 7
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 sachet.