mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 00:19:24 +01:00
Added a few to retrieve the channel number from Matterbridge's debug output.
parent
211e134fd9
commit
4e59179af6
@ -4,4 +4,24 @@
|
||||
#and https://www.linkedin.com/pulse/telegram-bots-beginners-marco-frau
|
||||
Token="Yourtokenhere"
|
||||
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
|
||||
```
|
||||
```
|
||||
|
||||
## Retrieving your chat number from Matterbridge
|
||||
### Setup
|
||||
Matterbridge can output your chat number as debug information. Here's how.
|
||||
- Bring up a bot as described above and retrieve your API token.
|
||||
- Make to sure to disable privacy mode on the bot.
|
||||
- Configure Matterbridge as illustrated above
|
||||
- Join the bot to your Telegram group
|
||||
### Generate events / output
|
||||
- Start Matterbridge with your new configuration in debug mode like so: ``` matterbridge -debug -config matterbridge.toml```
|
||||
- Create traffic in your group, chat up your bot.
|
||||
- Matterbridge will output debug information, this will look similar to this
|
||||
```
|
||||
[0009] DEBUG telegram: <= Message is config.Message{Text:"test from telegram", Channel:"-987654321", Username:"John Doe", UserID:"123456789", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"", Gateway:"", Timestamp:time.Time{wall:0x0, ext:> 0, loc:(*time.Location)(nil)}, ID:"31", Extra:map[string][]interface {}{}}
|
||||
```
|
||||
or
|
||||
```
|
||||
[0024] DEBUG telegram: => Receiving config.Message{Text:"test from xmpp", Channel:"-987654321", Username:"[xmpp] <userredacted> ", UserID:"example@conference.redacted.com/userredacted", Avatar:"", Account:"xmpp.myxmpp", Event:"", Protocol:"", Gateway:"gateway1", Timestamp:time.Time{wall:0xbeed3ca55451a133, ext:24805708196, loc:(*time.Location)(0x55cad0c84140)}, ID:"", Extra:map[string][]interface {}(nil)}
|
||||
```
|
||||
- The large *negative* number in behind ```Channel:``` is your channel number. Go configure the Matterbridge gateway section with it.
|
Loading…
Reference in New Issue
Block a user