Commit Graph

175 Commits (master)

Author SHA1 Message Date
Wim 2f33fe86f5
Update dependencies and build to go1.22 (#2113)
* Update dependencies and build to go1.22

* Fix api changes wrt to dependencies

* Update golangci config
1 week ago
Alexander 365acc36ea
Fix error messages in telegram and slack bridges (#1862)
* Fix message html entities escaping when sending to Telegram

* Fix error messages in telegram and slack bridges

Co-authored-by: Wim <wim@42.be>
2 years ago
Andy 700b95546b
Improve Slack attachments formatting (slack) (#1807)
* Improve Slack attachments formatting (slack)

* Add TitleLink
* Add Footer

* Fix linter issues
2 years ago
Alexander d7b7ff7bb4
Preserve threading for messages with files (slack) (#1781)
* Preserve threading for slack messages with files

* Update bridge/slack/slack.go

Co-authored-by: Wim <wim@42.be>
2 years ago
Alexander 6fe0cff342
Use slack real name as user name (slack) (#1775)
* Use slack real name as user name

* Change slack option UseRealName to UseFullName
2 years ago
Wim 6438a3dba3
Add support for deleting files from slack to discord. Fixes #1705 (#1709)
We create a new event EventFileDelete which will be used to delete
specific uploaded files using the Extra["file"] in the config.Message.

We also add a new NativeID key to the FileInfo struct which will contain
the native file ID of the sending bridge.

When a new file is added to the config.Message.Extra["file"] map, now
the bridge native file ID should be added here.

When the receiving bridge receives such a message, it should keep an
internal mapping of NativeID <> bridge fileid/message id. In the case of
discord we map it to the resulted discord message ID after uploading it.

Now when a bridge deletes a file, it should send a EventFileDelete and
setting the ID to the native file ID of the bridge.

When the receiving bridge will get this event it'll look into the
NativeID <> bridge id mapping to find their internal ID and use it to
delete the specific file on their side.

For now this is implemented for slack to discord but this will be add to
other bridges where useful.
2 years ago
Ivan Zuev 6a7412bf2b
Increase batch size for conversation.list api method (slack) (#1700)
Co-authored-by: Ivan Zuev <i-zuev@yandex-team.ru>
2 years ago
Jonathan Walker (Keenan) b06a574cc5
Invalidate user in cache on user change event (#1604)
Co-authored-by: Wim <wim@42.be>
3 years ago
Brian V 13bbeeaceb
Add space before file upload comment (slack) (#1554) 3 years ago
Wim c86137449e
Add a MessageClipped option to set your own clipped message. Closes #1359 (#1487) 3 years ago
Wim a0bca42a7a
Update vendor (#1461)
* Update vendored libs

* Fix slack api changes
3 years ago
Qais Patankar a9d8ac8bc0
Refactor "msg-parent-not-found" to config.ParentIDNotFound (#1347) 3 years ago
Wim c9cfa59f54
Do not use webhooks when token is configured (slack) (fixes #1123) (#1134) 4 years ago
Wim e564c555d7
Clip too long messages on 3000 length (slack). Fixes #1081 (#1102) 4 years ago
Wim 57794b3b9f
Prevent image/message looping (slack). Fixes #1088 (#1096)
Also check for our matterbridge ID in Blocks set in SubMessages.
4 years ago
Qais Patankar 98033b1ba7
Don't transmit typing events from ourselves (slack/discord) (#1056) 4 years ago
Qais Patankar d4acdf2f89
Use blocks not attachments (slack) (#1048)
This removes the extra space below messages, as shown in
https://user-images.githubusercontent.com/923242/77235190-a3359980-6bab-11ea-8b7b-697d730ae5c1.png
4 years ago
Qais Patankar 0951e75c85
Fix #1039: messages sent to Slack being synced back (#1046)
This is a regression from https://github.com/42wim/matterbridge/pull/581#issuecomment-562937576

Behaves the same as 95190f11bf
4 years ago
Qais Patankar 2fbac73c29
Ignore ConnectingEvent (slack) (#1041) 4 years ago
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
Qais Patankar 1d708ab351 Suppress unhandled HelloEvent message (slack) (#913) 5 years ago
Wim 5619a75b05
Fix regression in autojoining with legacy tokens (slack). Fixes #651 (#848) 5 years ago
Wim 65781b9316
Disable user lookups on delete messages (slack) (#812) 5 years ago
Duco van Amstel 9be0be0316 Add lacking clean-up in Slack synchronisation (#811) 5 years ago
Wim 64b57f2da3
Ignore message_replied and hidden messages (slack). Fixes #709 (#779) 5 years ago
David Hill 97f9d4be67 Fix double unlock (slack) (#771) 5 years ago
Duco van Amstel 8b754017ca Fix race-condition in populateUser() (#767)
Fix the root-cause of #759 by introducing synchronisation points for
individual user fetches.
5 years ago
Wim a27600046e
Fix regression for legacy slack by #766 (#768) 5 years ago
Duco van Amstel fb2667631d Refactor channel and user management (slack) (#766) 5 years ago
Duco van Amstel b638f7037a Force Slack link unfurling (#763) 5 years ago
Duco van Amstel 74699a8262 Split-out Slack user and channel management (#762) 5 years ago
Wim bf21604d42
Make all loggers derive from non-default instance (#728) 5 years ago
Wim 1f1634ea59 Add extra debug option (slack) 5 years ago
Wim 077b818d82 Add extra debug of SubMessage to empty messages error (slack). #709 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) 5 years ago
Wim c585d00f16 Ignore LatencyReport event (slack) 5 years ago
Jerry Heiselman d82726cd1b Try downloading files again if slack is too slow (slack). Closes #655 (#656) 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
Duco van Amstel a2754f15fc Enable errcheck linter (#646) 6 years ago
Wim 859ebad55d
Make slack-legacy change less restrictive (#626) 6 years ago
Patrick Connolly e538a4d304 Update nlopes/slack to 4.1-dev (#595) 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