Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram support #80

Closed
42wim opened this issue Nov 15, 2016 · 6 comments
Closed

Telegram support #80

42wim opened this issue Nov 15, 2016 · 6 comments

Comments

@42wim
Copy link
Owner

42wim commented Nov 15, 2016

If you want to try telegram support:

export GOPATH=~/go
mkdir -p ~/go/src/github.com/42wim
cd ~/go/src/github.com/42wim
git clone https://github.com/42wim/matterbridge
cd matterbridge
git checkout telegram
go build

You should now have a matterbridge binary

[telegram]
[telegram.test]
Token="yourbottoken"

For the channel configuration you'll have to use the telegram chatid (a number). If you don't know the chat id you can try to find it by running matterbridge -debug and try to send a message to the bot.

[[gateway]]
[[gateway.in]]
    account="irc.test"
    channel="#telegramtest"
[[gateway.in]]
    account="telegram.test"
    channel="123456789123456789"
[[gateway.out]]
    account="telegram.test"
    channel="123456789123456789"
[[gateway.out]]
    account="irc.test"
    channel="#telegramtest"
@42wim 42wim mentioned this issue Nov 15, 2016
26 tasks
@jlsjonas
Copy link

will test shortly

@jlsjonas
Copy link

jlsjonas commented Nov 19, 2016

please note that "github.com/technoweenie/multipartstreamer" was missing, latest version downloaded using go get

using following .toml

[irc]
    [freenode.test]
    Server="irc.freenode.net:6667"
    Nick="matterbot"

[telegram]
    [telegram.test]
    Token="telegramtokenhere"

[[gateway]]
name="gateway1"
enable=true
[[gateway.in]]
    account="freenode.test"
    channel="#telegramtest"
[[gateway.in]]
    account="telegram.test"
    channel="-1001076781244"
[[gateway.out]]
    account="telegram.test"
    channel="-1001076781244"
[[gateway.out]]
    account="freenode.test"
    channel="#telegramtest"

@42wim feel free to contact me privately to obtain the telegram token for testing purposes

following output:

$ ./matterbridge -debug
INFO[2016-11-19T14:17:33+01:00] enabling debug
running version 0.7.0-dev
starting gateway "gateway1"
INFO[2016-11-19T14:17:33+01:00] Starting bridge: freenode.test channel: #telegramtest
INFO[2016-11-19T14:17:33+01:00] Starting bridge: telegram.test channel: -1001076781244
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7421b]

goroutine 20 [running]:
panic(0x4e3ac0, 0xc420010100)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/42wim/matterbridge/gateway.New(0xc420078b40, 0xc4200a72c0, 0x0, 0x0)
    /Users/jonas/go/src/github.com/42wim/matterbridge/gateway/gateway.go:42 +0x61b
main.main.func2(0xc420078b40, 0xc4201215a0, 0x8, 0x1, 0xc42007bd40, 0x2, 0x2, 0xc42007be00, 0x2, 0x2)
    /Users/jonas/go/src/github.com/42wim/matterbridge/matterbridge.go:53 +0x82
created by main.main
    /Users/jonas/go/src/github.com/42wim/matterbridge/matterbridge.go:57 +0x4c2

@42wim
Copy link
Owner Author

42wim commented Nov 19, 2016

Thanks for testing. Seems like I made a fault in the example ;(
You should replace freenode.test should be irc.test or irc.freenode in your config (protocol.name)

(missing dependencies now also vendored)

Would love to have the token to test, if you're on twitter could you dm it to me ? https://twitter.com/42wim

@jlsjonas
Copy link

better indeed, but still seems like there's an issue at/right after joining the IRC channel (channel never joined, but might be because of a telegram-side issue)

INFO[2016-11-19T16:50:47+01:00] enabling debug
running version 0.7.0-dev
starting gateway "gateway1"
INFO[2016-11-19T16:50:47+01:00] Starting bridge: irc.freenode channel: #telegramtest
INFO[2016-11-19T16:50:47+01:00] Starting bridge: telegram.test channel: -1001076781244
INFO[2016-11-19T16:50:47+01:00] Connecting irc.freenode.net:6667              module=irc
2016/11/19 16:50:47 --> NICK matterbottesting
2016/11/19 16:50:47 --> USER matterbottesting 0.0.0.0 0.0.0.0 :matterbottesting
2016/11/19 16:50:47 <-- :niven.freenode.net NOTICE * :*** Looking up your hostname...
2016/11/19 16:50:47 <-- :niven.freenode.net NOTICE * :*** Checking Ident
2016/11/19 16:50:47 <-- :niven.freenode.net NOTICE * :*** Couldn't look up your hostname
2016/11/19 16:50:54 <-- :niven.freenode.net NOTICE * :*** No Ident response
2016/11/19 16:50:54 <-- :niven.freenode.net 001 matterbottesting :Welcome to the freenode Internet Relay Chat Network matterbottesting
DEBU[2016-11-19T16:50:54+01:00] Registering callbacks                         module=irc
DEBU[2016-11-19T16:50:54+01:00] ":niven.freenode.net 001 matterbottesting :Welcome to the freenode Internet Relay Chat Network matterbottesting"  module=irc
2016/11/19 16:50:54 <-- :niven.freenode.net 002 matterbottesting :Your host is niven.freenode.net[2a01:7e00::f03c:91ff:fee2:413b/6667], running version ircd-seven-1.1.4
2016/11/19 16:50:54 <-- :niven.freenode.net 003 matterbottesting :This server was created Thu Sep 22 2016 at 20:50:43 UTC
2016/11/19 16:50:54 <-- :niven.freenode.net 004 matterbottesting niven.freenode.net ircd-seven-1.1.4 DOQRSZaghilopswz CFILMPQSbcefgijklmnopqrstvz bkloveqjfI
2016/11/19 16:50:54 <-- :niven.freenode.net 005 matterbottesting CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstz CHANLIMIT=#:120 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=freenode KNOCK STATUSMSG=@+ CALLERID=g :are supported by this server
2016/11/19 16:50:54 <-- :niven.freenode.net 005 matterbottesting CASEMAPPING=rfc1459 CHARSET=ascii NICKLEN=16 CHANNELLEN=50 TOPICLEN=390 ETRACE CPRIVMSG CNOTICE DEAF=D MONITOR=100 FNC TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: :are supported by this server
INFO[2016-11-19T16:50:54+01:00] Connection succeeded                          module=irc
INFO[2016-11-19T16:50:54+01:00] irc.freenode: joining #telegramtest
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7421b]

goroutine 6 [running]:
panic(0x4e3ac0, 0xc420010100)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/42wim/matterbridge/gateway.New(0xc420072b40, 0xc4200153b0, 0x0, 0x0)
    /Users/jonas/go/src/github.com/42wim/matterbridge/gateway/gateway.go:42 +0x61b
main.main.func2(0xc420072b40, 0xc4201076e0, 0x8, 0x1, 0xc420013e40, 0x2, 0x2, 0xc420013f00, 0x2, 0x2)
    /Users/jonas/go/src/github.com/42wim/matterbridge/matterbridge.go:53 +0x82
created by main.main
    /Users/jonas/go/src/github.com/42wim/matterbridge/matterbridge.go:57 +0x4c2

(I followed you on twitter meanwhile, waiting for the follow-back to DM)

@42wim
Copy link
Owner Author

42wim commented Nov 19, 2016

Hm that's strange, your paste shows running version 0.7.0-dev the telegram branch is on 0.9.0-dev though are you sure you're running the correct binary ?

(twitter followed)

@42wim
Copy link
Owner Author

42wim commented Nov 20, 2016

Thanks for testing, merged into master now.

@42wim 42wim closed this as completed Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants