Giter Site home page Giter Site logo

zulip_slack_integration's People

Contributors

daawesomep avatar robsiemb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

robsiemb

zulip_slack_integration's Issues

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:

  1. 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.
  2. 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.
  3. This message is a message_changed subtype.
  4. 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.
  5. Error as above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.