Commit Graph

25 Commits (250b3bb5795240d5ebdab5416ab99dbc41be734b)

Author SHA1 Message Date
Wim 250b3bb579
Use upstream slack-go/slack again (#1018) 4 years ago
Wim 45bf1fd63a
Convert slack bold/strike to correct markdown (slack). Fixes #918 (#930) 5 years ago
Duco van Amstel fb2667631d Refactor channel and user management (slack) (#766) 5 years ago
Duco van Amstel 74699a8262 Split-out Slack user and channel management (#762) 5 years ago
Wim 57f156be83
Hint at thread replies when messages are unthreaded (slack) (#684) 5 years ago
Wim 4ae028fe73 Optimize handling of very large slack teams. Fixes #695
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.
5 years ago
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
5 years ago
Qais Patankar 8522d8f29c Fix #668 strip lang in code fences sent to Slack (#673) 6 years ago
Wim 53c86702a3
Add wait option for populateUsers/Channels (slack) Fixes #579 (#653)
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.
6 years ago
David Hill 192fe89789 Populate user on channel join (slack) (#644) 6 years ago
Wim 959ca3cef3 Fix bot (legacy token) messages not being send. Closes #571 6 years ago
Wim d887855e16 Add bot debug info (slack) 6 years ago
Patrick Connolly fc5e3a6728 Create getChannelsByX functions to make codeclimate happy (slack) (#610) 6 years ago
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.
6 years ago
Wim ae32bae791
Add protocol to msg.ID in cache (#596) 6 years ago
Duco van Amstel 2f042ad915 Add more rate-limit handling (slack) (#581) 6 years ago
Wim 1e0bb3da95 Make gocritic linter happier 6 years ago
Duco van Amstel ea86849a58 Fix Slack edit usernames (#570) 6 years ago
Duco van Amstel d2a1dc792f Refactor and clean-up handlers. (slack) (#533) 6 years ago
David Hill 0e2522279e Clean up various stuff (#508)
* various cleanups
6 years ago
Duco van Amstel 1269be1d04 Prevent Slack API rate-limit overflow (#539) 6 years ago
Patrick Connolly d379118772 Fix bridge no longer POSTing username and avatar (slack) (#536)
* Fixed pointer/reference issue in populateUsers. [#536]

* Accepted codestyle suggestion.

* Update bridge/slack/helpers.go

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

* Update helpers.go
6 years ago
Duco van Amstel 6238effdc2 Clean up user and channel information management (slack) (#521) 6 years ago
Duco van Amstel 498377a230 Clean up code and strengthening (slack) (#519)
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.
6 years ago
Duco van Amstel e15b0e04b8 Refactor slack bridge prelude (#517)
Distributing the source of the Slack bridge across multiple files to
increase readability and as a prelude to various refactors and
clean-ups.
6 years ago