Commit Graph

35 Commits

Author SHA1 Message Date
Wim
c9cfa59f54
Do not use webhooks when token is configured (slack) (fixes ) () 2020-05-14 00:27:34 +02:00
Wim
57794b3b9f
Prevent image/message looping (slack). Fixes ()
Also check for our matterbridge ID in Blocks set in SubMessages.
2020-04-18 22:30:49 +02:00
Qais Patankar
98033b1ba7
Don't transmit typing events from ourselves (slack/discord) () 2020-03-22 18:39:11 +01:00
Qais Patankar
d4acdf2f89
Use blocks not attachments (slack) ()
This removes the extra space below messages, as shown in
https://user-images.githubusercontent.com/923242/77235190-a3359980-6bab-11ea-8b7b-697d730ae5c1.png
2020-03-21 21:03:12 +01:00
Qais Patankar
2fbac73c29
Ignore ConnectingEvent (slack) () 2020-03-18 23:03:20 +01:00
Wim
250b3bb579
Use upstream slack-go/slack again () 2020-03-01 20:59:19 +01:00
Wim
45bf1fd63a
Convert slack bold/strike to correct markdown (slack). Fixes () 2019-10-27 01:10:59 +02:00
Qais Patankar
1d708ab351 Suppress unhandled HelloEvent message (slack) () 2019-10-04 00:19:50 +02:00
Wim
65781b9316
Disable user lookups on delete messages (slack) () 2019-04-23 23:29:15 +02:00
Wim
64b57f2da3
Ignore message_replied and hidden messages (slack). Fixes () 2019-03-27 22:54:18 +01:00
Duco van Amstel
fb2667631d Refactor channel and user management (slack) () 2019-03-15 21:23:09 +01:00
Wim
077b818d82 Add extra debug of SubMessage to empty messages error (slack). 2019-02-15 18:05:10 +01:00
Wim
4ae028fe73 Optimize handling of very large slack teams. Fixes
Stop getting users if we reach 2000 users. Slack will rate-limit us
even if we follow their limits.
This means that we now have to lookup every user that says a message
for the first time. This should be less intensive on the API.

This also disables partly fb713ed91b for now.
ChannelMembers will not be filled.
2019-01-30 23:28:37 +01:00
Wim
fb713ed91b
Add initial support for getting ChannelMember info of all bridges ()
* 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
c585d00f16 Ignore LatencyReport event (slack) 2019-01-02 23:55:00 +01:00
Jerry Heiselman
d82726cd1b Try downloading files again if slack is too slow (slack). Closes () 2018-12-19 22:01:05 +01:00
Wim
53c86702a3
Add wait option for populateUsers/Channels (slack) Fixes ()
When setting wait to true, we wait until the populating isn't in progress anymore.
This is used on startup connections where we really need the initial information
which could take a long time on big servers.
2018-12-15 23:11:03 +01:00
David Hill
192fe89789 Populate user on channel join (slack) () 2018-12-15 22:57:54 +01:00
Patrick Connolly
f5659d455d Sync channel topics between Slack bridges ()
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
8869e253ca Handle deleted/edited thread starting messages (slack). Fixes () 2018-11-25 10:08:57 +00:00
Wim
ae32bae791
Add protocol to msg.ID in cache () 2018-11-19 21:28:23 +01:00
Duco van Amstel
ce21ba1545 Fix golint linter issues and enable it in CI () 2018-11-15 20:43:43 +01:00
Patrick Connolly
4254ed3c63 Fix regression in skip logic (slack). () 2018-11-15 19:23:46 +01:00
Patrick Connolly
09713d40ba Fix file caching issue (slack). () 2018-11-14 21:00:21 +01:00
Duco van Amstel
e9419f10d3 Restore file comments coming from Slack () 2018-11-12 15:58:00 +01:00
Wim
78401214b0 Make scopelint happy 2018-11-08 22:29:34 +01:00
Wim
59994da176 Act only on UserTypingEvents when enabled 2018-11-08 21:52:10 +01:00
Patrick Connolly
3d281b3316 Add ability to show when user is typing across Slack bridges () 2018-11-08 20:45:40 +01:00
Duco van Amstel
ea86849a58 Fix Slack edit usernames () 2018-11-08 20:07:21 +01:00
Duco van Amstel
d2a1dc792f Refactor and clean-up handlers. (slack) () 2018-11-07 21:35:59 +01:00
David Hill
0e2522279e Clean up various stuff ()
* various cleanups
2018-11-07 20:36:50 +01:00
Patrick Connolly
a20b7895a9 Preserve threading between Slack instances ()
* Opportunistically preserve Slack threading when parent thread in cache. []

* 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
Duco van Amstel
6238effdc2 Clean up user and channel information management (slack) () 2018-10-16 20:34:09 +02:00
Duco van Amstel
498377a230 Clean up code and strengthening (slack) ()
Changes include:
- Refactor of strings into package-wide constants.
- Predeclaration of regexps to be instantiated at package load time.
- Checking of unchecked errors.
- Structural changes:
  - Adding verifications to type-casting code.
  - Remove unnecessary 'len(X) > 0' checks before iterating over X.
  - Remove unnecessary 'else' clause after 'if' with 'return'.
  - Unexporting of public fields of Bridge struct.
- Formatting:
  - One-field-per-line struct definitions.
2018-10-13 01:02:14 +02:00
Duco van Amstel
e15b0e04b8 Refactor slack bridge prelude ()
Distributing the source of the Slack bridge across multiple files to
increase readability and as a prelude to various refactors and
clean-ups.
2018-10-12 23:16:34 +02:00