5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 03:50:26 +00:00
Commit Graph

118 Commits

Author SHA1 Message Date
Wim
57f156be83
Hint at thread replies when messages are unthreaded (slack) (#684) 2019-02-10 17:23:50 +01:00
Wim
707db950c8 Send GetChannelMembers event only to slack for now 2019-01-24 22:46:05 +01:00
Wim
fb713ed91b
Add initial support for getting ChannelMember info of all bridges (#678)
* Add initial support for getting ChannelMember info of all bridges.

Adds an EventGetChannelMembers event, which gets send every x time to
all bridges. Bridges should respond on this event with a Message
containing ChannelMembers in the EventGetChannelMembers key in the
Extra field.

handleEventGetChannelMembers will handle this Message and sets the
contained ChannelMembers to the Bridge struct.

* Add ChannelMembers support to the slack bridge
2019-01-18 18:35:31 +01:00
Wim
56749dfb20 Fail if channel starts with hashtag (mattermost). Closes #625 2019-01-07 00:26:11 +01:00
Duco van Amstel
da8e415ae1 Use logrus imports instead of log (#662) 2018-12-26 15:16:09 +01:00
Wim
ccd55d2a28
Refactor gateway (#648)
* Decrease complexity of handleMessage, handleReceive, handleFiles
* Move handlers to handlers.go
* Split ignoreMessage up in ignoreTextEmpty, ignoreNicks and IgnoreTexts
* Add ignoreEvent
* Add testcase for ignoreTextEmpty, ignoreNicks, ignoreTexts and ignoreEvent
2018-12-12 23:57:17 +01:00
Duco van Amstel
af7a00d030 Enable gosec linter (#645) 2018-12-06 00:40:55 +01:00
Patrick Connolly
47d29ecf63 Tidy up fetching of config values. (#616) 2018-12-01 00:24:07 +01:00
Patrick Connolly
f2088a687e Extract bridgeMap into own package to improve testability (#601) 2018-11-30 23:53:00 +01:00
Patrick Connolly
f5659d455d Sync channel topics between Slack bridges (#585)
Added logic to allow for configurable synchronisation of topics and purposes of channels between Slack bridges.
2018-11-26 09:47:04 +00:00
Wim
f4d4dc91b1
Add option to ignore failing bridge on start. Fixes #455 (#603) 2018-11-25 10:35:35 +01:00
Wim
ae32bae791
Add protocol to msg.ID in cache (#596) 2018-11-19 21:28:23 +01:00
Duco van Amstel
ce21ba1545 Fix golint linter issues and enable it in CI (#593) 2018-11-15 20:43:43 +01:00
Duco van Amstel
16d5aeac7c Make config.Config more unit-test friendly (#586) 2018-11-13 23:30:56 +01:00
Duco van Amstel
e19ba5a06a Add new Slack connection and forked legacy Slack bridge (#582) 2018-11-13 20:51:19 +01:00
Wim
730ccdd456 Add support for mattermost matterbridge plugin 2018-11-11 21:56:12 +01:00
Wim
9be0f8f000 Make gochecknoinits linter happy 2018-11-08 22:33:03 +01:00
Wim
78401214b0 Make scopelint happy 2018-11-08 22:29:34 +01:00
Wim
b2a07aba3a Make goconst linter happy 2018-11-08 22:20:03 +01:00
Patrick Connolly
3d281b3316 Add ability to show when user is typing across Slack bridges (#559) 2018-11-08 20:45:40 +01:00
Wim
399789811e Make gocritic linter happy 2018-11-08 00:46:34 +01:00
Wim
1794922263 Make unparam linter happy 2018-11-08 00:29:30 +01:00
David Hill
0e2522279e Clean up various stuff (#508)
* various cleanups
2018-11-07 20:36:50 +01:00
Patrick Connolly
a20b7895a9 Preserve threading between Slack instances (#529)
* Opportunistically preserve Slack threading when parent thread in cache. [#529]

* Removed slack-specific processing from gateway.

* Added docs.

* Add option to enable threading, with default to off.

* Did cleanup on @42wim's comments.

* Update gateway/gateway.go

Co-Authored-By: patcon <patrick.c.connolly@gmail.com>

* Suggestion from @42wim :)

* Suggestions from @42wim.

* More suggestions.
2018-11-07 09:14:31 +01:00
Patrick Connolly
291594b99c Allow origin CHANNEL to be used in RemoteNickFormat (#515)
* Added origin CHANNEL to RemoteNickFormat. Updated config docs. [Fixes #515]

* Update matterbridge.toml.sample

Co-Authored-By: patcon <patrick.c.connolly@gmail.com>
2018-10-23 21:53:11 +02:00
Duco van Amstel
3dd4ec57ff Fix race in gateway test. (#520) 2018-10-13 00:47:18 +02:00
Duco van Amstel
69646a160d Add Gateway's name to RemoteNickFormat (#501)
In order to support extra use cases we should add the `{GATEWAY}` tag to the `RemoteNickFormat` string which would be replaced by the value of the `name=` field from a gateway's configuration.

This is _very_ useful when you are forwarding, for example, multiple channels from one chat to a single channel on another one (one-way). It will help you identify the source channel of a message on the target chat.
2018-10-07 15:22:15 +02:00
Liam Stanley
51327a4056 Reconnect on quit. (irc) See #431 (#445)
* potential fixes for #431
* go: fix formatting/gofmt/goreturns
2018-06-09 12:47:40 +02:00
Remi Reuvekamp
33bd60528b Add config option MediaDownloadPath (#443)
* Add config option MediaUploadPath

MediaDownloadPath can be used instead of MediaServerUpload, for when your
webserver is on the same system as matterbridge and matterbridge has
write access to the serve dir.

* Limit length of hash in MediaServer urls to 8chars

Full SHA256 is unnecessary for uniqueness.
Also; if a file has the same first 8 charachters of the SHA256 hash,
it's still not a problem, as long as the filename is not the same.
2018-06-08 22:30:35 +02:00
Wim
45296100df Add initial zulip support 2018-05-07 21:35:48 +02:00
Wim
c6c92e273d Use only alphanumeric for file uploads to mediaserver. Closes #416 2018-05-06 20:32:09 +02:00
Wim
467b373c43 Fix crash on invalid filenames 2018-05-06 20:14:16 +02:00
Wim
9e5da2f9d7 Fix regression on empty text with files attached 2018-03-06 21:30:59 +01:00
Wim
a284a228a3 Get the correct config values (gateway) 2018-03-06 21:19:00 +01:00
Wim
fdd5ada98c Fix panic on empty config. Closes #386 2018-03-05 22:23:01 +01:00
Wim
98027446c8 Fix tests and make megacheck happy 2018-03-05 00:30:46 +01:00
Wim
f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 2018-03-04 23:52:14 +01:00
Wim
594d2155e3 Improve debug messages 2018-02-28 22:23:29 +01:00
Wim
02a5bc096f Do some small cleanups 2018-02-27 23:22:12 +01:00
Wim
2110db6f0c Add environment override back 2018-02-27 23:22:12 +01:00
Wim
2bac867382 Refactor using factory 2018-02-27 23:22:12 +01:00
Wim
82396e73f5 Allow empty messages with file urls (irc) 2018-02-25 00:40:07 +01:00
Wim
d1227b5fc9 Use prefixed-formatter for better logging 2018-02-21 00:20:25 +01:00
Wim
6ea368c383 Move Sirupsen => sirupsen 2018-02-20 23:41:09 +01:00
Wim
e622587db4 Add label support in RemoteNickFormat 2018-02-20 18:57:46 +01:00
Wim
7886f05e88 Download (and upload) avatar images from mattermost and telegram when mediaserver is configured. Closes #362
An extra avatarMap (cache) is created for mattermost and telegram.
If MediaServerUpload is configured, the avatar images of users are downloaded the first time a
user sends a message.
If this download succeeds a message with EVENT_AVATAR_DOWNLOAD is sent to the originating protocol.
This message also contains a SHA field (in msg.Extra["file"]), if this is not empty, the sha will
be added to the avatarMap. (so we now have a userid-sha cache)

Next time this user sends a message, the MediaServerUpload/sha/userid.png URL will be used as the
avatar field.
2018-02-20 01:15:25 +01:00
Wim
f58be0d1c1 Add SHA to FileInfo 2018-02-15 23:18:58 +01:00
Wim
80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See #359 2018-02-03 01:11:11 +01:00
Wim
67f6257617 Add ShowTopicChange option. Allow/disable topic change messages (currently only from slack). Closes #353 2018-02-02 21:08:13 +01:00
Wim
6bd808ce91 Lowercase irc channels in config. Closes #348 2018-01-28 19:15:13 +01:00