Commit Graph

434 Commits

Author SHA1 Message Date
Patrick Connolly
8971502f31 Allowed Slack attachments to be properly updated on edit. 2018-10-24 17:03:00 +08:00
Patrick Connolly
eeccb7acd3 Fixed bug in msg/rmsg confusion. 2018-10-24 17:02:29 +08:00
Patrick Connolly
434184507a Merge branch '536-fixed-populateUsers' into 499-google-translation 2018-10-24 15:43:35 +08:00
Patrick Connolly
4bcd1171a7 Merge branch 'master' into 499-google-translation 2018-10-24 15:38:52 +08:00
Patrick Connolly
24a60f262a Update helpers.go 2018-10-24 11:58:20 +08:00
Wim
76a601a474 Update bridge/slack/helpers.go
Co-Authored-By: patcon <patrick.c.connolly@gmail.com>
2018-10-24 11:38:57 +08:00
Patrick Connolly
7705aa2a3b Accepted codestyle suggestion. 2018-10-24 01:32:50 +08:00
Patrick Connolly
fc8fe48b49 Cleaned up logic around knowing whether message is translated. 2018-10-23 22:41:58 +08:00
Patrick Connolly
c0b64573a5 Created handleTranslation func. Added IsTranslation key to Message struct. 2018-10-23 20:17:42 +08:00
Patrick Connolly
c42a4db10b Moved Google Translate client to Router. 2018-10-23 19:34:47 +08:00
Patrick Connolly
25dc18518e Fixed pointer/reference issue in populateUsers. [#536] 2018-10-23 19:10:32 +08:00
Patrick Connolly
5697772ee3 Removed newlines from link to untranslated message. 2018-10-23 17:39:48 +08:00
Duco van Amstel
f2cdda7278 Update Blackfriday dependency (closes #522) (#532)
- Fixup Telegram bridge implementation to support updated dependency.
2018-10-22 19:48:29 +02:00
Duco van Amstel
6911458d15 Clean up message send logic (slack). (#531) 2018-10-22 19:43:57 +02:00
Patrick Connolly
3b0a91d3ee Fixed poor trimming of translation source text. 2018-10-20 19:48:36 +08:00
Patrick Connolly
311ac5a099 Added general slack msg options back into API call. 2018-10-20 19:31:55 +08:00
Patrick Connolly
93a87e153d Fixed missing variable. 2018-10-20 18:16:50 +08:00
Patrick Connolly
21c8dcb1ba Show untranslated text in attachment when using Slack. 2018-10-20 18:09:59 +08:00
Patrick Connolly
5a2610991c Updated to accomodate breaking changes in slack pkg. 2018-10-20 17:49:12 +08:00
Duco van Amstel
6238effdc2 Clean up user and channel information management (slack) (#521) 2018-10-16 20:34:09 +02:00
Patrick Connolly
03e2b90a24 Merge branch 'master' into 499-google-translation 2018-10-15 07:09:37 +08:00
Patrick Connolly
f32e7a9c35 Moved translation attribute into toml config. Now using origmsg var for msg text. 2018-10-15 06:48:14 +08:00
Patrick Connolly
aeb06c7478 Moved translation client from bridge to router. 2018-10-15 03:50:44 +08:00
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.
2018-10-13 01:02:14 +02:00
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.
2018-10-12 23:16:34 +02:00
NikkyAI
54adb0509e Fix mentions cuttíng off all text after the mention (discord) (#506) 2018-09-29 20:02:59 +02:00
Patrick Connolly
8e6e8fa8ed Added debugging to test translation. 2018-09-28 18:04:45 +08:00
Wim
bd3a3b6eaf Let webhook also replace mentions (discord). Closes #502 2018-09-22 22:15:19 +02:00
NikkyAI
296428d53e Fix Discord mentions by populating the nickMemberMap at connect (#498) 2018-09-17 21:25:06 +02:00
Jerry Heiselman
a431a4fa04 Replace @... string with user mention if match found (discord) (#492). Closes #460
* Added check for @-mention pattern and replacing it with a user with a matching Nick on incoming messages
2018-09-12 22:30:14 +02:00
Wim
330ddb6a30 Fix panic by using matterclient calls in the right place. Related to cb7278eb (mattermost). Closes #491 2018-08-30 23:04:50 +02:00
Wim
52dbd702ad Get up to 1000 channels and private/mp/im channels (slack). Related to #489 2018-08-28 22:33:07 +02:00
Wim
d7c3570ba3 Check nickname on kick (irc). Closes #488 2018-08-27 21:20:41 +02:00
Wim
b51fdbce9f Add caching to fix issue with slack API changes (slack). #481 2018-08-18 00:12:05 +02:00
Wim
351b423e15 Add a bit more debugging (irc). #482 2018-08-16 23:02:28 +02:00
Wim
7690be1647 Fix slack file/image downloads after api changes (slack) 2018-08-10 00:39:07 +02:00
Wim
7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 2018-08-06 21:11:13 +02:00
Wim
d71850cef6 Use UserID to look for avatar instead of username (slack). Closes #472 2018-08-06 16:44:15 +02:00
Wim
2597c9bfac Clip too long messages sent to discord (discord). Closes #440 2018-07-22 00:28:17 +02:00
Wim
93307b57aa Skip empty messages being sent with the webhook (discord). #469 2018-07-21 23:19:11 +02:00
Wim
618953c865 Remove ununsed function (slack) 2018-07-13 23:28:23 +02:00
Wim
e04dd78624 Add support for slack channels by ID. Closes #436 2018-07-13 23:23:11 +02:00
Wim
fa0c4025f7 Fix avatar uploads to work with MediaDownloadPath. Closes #454 2018-07-11 23:44:29 +02:00
John
2d2d185200 Stop numbers being stripped after non-color control codes (irc) (#465)
Currently numbers are stripped not just after the color control code (\x03) but also after other formatting such as bold (\x02) and italic (\x1D), which is both unnecessary and leads to missing text from irc. This fixes that by only stripping numbers after the color control code.
2018-07-11 22:50:49 +02:00
Wim
cb7278eb50 Use nickname instead of username if defined (mattermost). Closes #452 2018-07-03 22:41:09 +02:00
Wim
ed062e0ce5 Add a space before url in file uploads (discord). Closes #461 2018-06-29 22:35:29 +02:00
Wim
a69ef8402b Fix previous commit 2018-06-28 21:19:02 +02:00
Wim
8779f67d2d Allow join-leave and topic changes to webhook (discord) 2018-06-28 21:14:31 +02:00
Wim
e4b72136b8 Fix possible panic. #448 2018-06-19 22:53:45 +02:00
Wim
221a63d980 Fix build (telegram) 2018-06-18 23:49:28 +02:00