zulip_slack_integration's People
Forkers
robsiembzulip_slack_integration's Issues
Update slack library
We are currently using a commit reference to the slack library to combat this bug: slackapi/python-slack-sdk#451 The newer releases should be checked for breaking changes, and our dependency version should be updated.
Link attachment truncate
I did not implement a truncation for link attachments. Cut off at 255 characters and add a ...
is probably sufficient. However, it should be careful not to cut off other links found inside the attachment description text.
Slack link replacement
Slack links are not converted. Slack follows the syntax <http://xyz|my link text>
and zulip uses traditional markdown links [my link text](http://xyz)
. I should note that it does not appear that users can create custom-text links, only slack itself and possibly bots (untested). User links seem to always appear as <http://xyz>
.
I did not implement this quickly because it also must take into account code tags ```
and the inline variant.
Bot-generated message edits cause KeyError
Error looks like:
Oopsie! 2020-02-03 14:10:41,739 main ERROR Error receive slack message: ['Traceback (most recent call last):\n', ' File "/srv/zulip_slack_integrations/main/init.py", line 172, in receive_slack_msg\n user_id = data['user']\n', "KeyError: 'user'\n"],
This occurs after the following steps:
- A message is bridged from zulip to slack containing a link, say from Imagur
1a. (happens but not relevant) The bridge discards the reflected message, as it is generated by the bridge bot. - Another bot (or maybe slack itself?) decides the message needs to be edited to add an attachment, because the link points at something that is attachable.
- This message is a message_changed subtype.
- The brige handles message_changed by replacing the message with the contents of one of the subfields. However, in this case, this sub-field has a subtype of "bot_message"
4a. We do not do the special handling of bot_message subtype before we try to access the user. - Error as above.
Slack keywords not always detected/replaced
There is some condition that causes @
and #
to not be replaced properly sometime. Some sort of issue with the regex.
Image sent from groupme->slack comes with zulip formatting
Problem is obviously in this block of code, where images need to be treated differently for sending to slack.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.