Coder Social home page Coder Social logo

jinora's Introduction

jinora

jinora is a simple slack-backed chat application that proxies messages to and fro between slack and an anonymous chat platform. It allows your team to maintain a #public channel where anonymous users can come and talk to your entire team. You can then direct users wanting support, for example, to your jinora instance where you can help them resolve the issue over chat.

No more need to having your team monitor IRC or Olark, it can all be done in Slack.

Deploy

Jinora artwork by peachei

Features

  1. Make a truly public channel in Slack (no need of a paid plan)
  2. Emoji support
  3. Translates all #channel hashtags and user @mentions properly
  4. Messages sent from Slack are highlighted as official
  5. Circular buffer that stores messages in memory (configurable limit)
  6. Supports shadow-banning of users. Also nicks can be reserved by adding them to your jsonblob.
  7. Announcements can be made by team members which are visible to all clients.

Setup Instructions

Configuration Options:

  • OUTGOING_TOKEN Service Token from Slack's outgoing webhook
  • INCOMING_HOOK_URL URL from Slack's incoming webhook
  • SESSION_SECRET Session secret key (currently useless)
  • API_TOKEN API Token for the slack team. Generated at https://api.slack.com/custom-integrations/legacy-tokens (scroll to bottom). Bot users tokens may work, but have not been tested.
  • BUFFER_SIZE Number of messages to keep in memory. This is automatically rotated and lost on reboots. Recommended value is 500-1000
  • SLACK_CHANNEL Name of slack channel to send messages to. Default is "public".
  • BANNED_CHANNEL Name of slack channel to send messages from banned users. Default is "public-hell".
  • RESERVED_NICKS_URL Link to your jsonblob url /api/jsonblob/<blobid>
  • ORGANIZATION_NAME Name of your organization. The title and heading of the page will be "Chat with <ORGANIZTION_NAME>"

These configuration options can either be provided via a .env file in development, or via Heroku config variables, if you are deploying to Heroku. A sample env file is provided in .env.sample.

Slack-side configuration

  1. Create a #public channel (could be called anything).
  2. Create an outgoing webhook that listens only on #public.
  3. Create an incoming webhook, and note down its URL.
  4. Create a #public-hell channel (could be called anything).

Screenshots for a better understanding (outgoing and then incoming):

Outgoing Webhook

Incoming Webhook

JsonBlob Sample

Architecture

       +--------------+        
       |    #public   |        
       |    channel   |        
       +--^--------^--+        
          |        |           
       +--v--------v--+        
       |    SLACK     |        
       |              |        
       +--^--------^--+        
          |        |           
Incoming  |        |  Outgoing 
 webhook  |        |  webhook  
       +--v--------v--+        
       |              |        
       |    JINORA    |        
       |    SERVER    |        
       |              |        
       +--^--------^--+        
          |        |           
          |        |  Socket.IO
          |        |           
       +--v--------v--+        
       |              |        
       |     YOUR     |        
       |    USERS     |        
       |              |        
       +--------------+        

Jinora communicates with slack by means of two webhooks, one incoming and one outgoing. This communication is then broadcasted to all clients connected to Jinora. On the other side, all messages that Jinora receives from any of the user is sent back to Slack.

How to ban?

Read this wiki

How to make announcements?

Announcements can be made by typing !announce some_announcement in your public channel where some_announcement is to be replaced by some text. Anouncements are sent in real time to all clients and dispayed in an announcement area at the top right. You can remove announcement by typing !announce -.

Remember that messages prefixed with ! are commands interpreted by jinora, and these messages are not sent to clients. You can see a list of all jinora commands by entering !help in the public channel.

Upgrading

Make sure you upgrade to 2.0.1 atleast. To upgrade from 1.x to 2.x, follow these steps:

  1. Go to your incoming webhook and note down the URL
  2. Go to heroku config and set the following variables:
INCOMING_HOOK_URL=https://hooks.slack.com/services/WHAT_YOU_COPIED
BUFFER_SIZE=1000
SLACK_CHANNEL=public
BASE_URL=https://jinora.herokuapp.com #Replace this with your base url
  1. Push the update.
  2. You can remove the old INCOMING_TOKEN config.

Licence

Jinora is licenced under the MIT Licence.

Credits

Artwork by peachei.deviantart.com

The polymer source is based on paper-chat by pubnub.

jinora's People

Contributors

agrim123 avatar alphadose avatar apsdehal avatar arpitsingla96 avatar aryaman-titan avatar aryanraj avatar c0dzilla avatar captn3m0 avatar csoni111 avatar entropitor avatar gupta-utkarsh avatar nazywam avatar sin3point14 avatar sir-will avatar tnmy44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jinora's Issues

RTM Integration

Slack released an RTM API recently (Real Time Messaging), which can be used to add the following features to Jinora:

  • List of slack members online on #public
  • Joining/Leaving notifications for slack members

Emojis

I am not getting any emoticons send by people from your slack channel.

partial clear

Instead of the !clear command, jinora should also support !clear [N] which would only clear the last N messages.

Alternatively, a time-bound limit could also be used as !clear 5m or !clear 2h

error on length

web@ns1:~/smws.interalia.net/chat/jinora$  node_modules/.bin/coffee app.coffee
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0

TypeError: Cannot read property 'length' of undefined
  at sendInitialPresenceEvent (/export/web/smws.interalia.net/chat/jinora/node_modules/slack-utils/rtm.js:44:28)
  at Request._callback (/export/web/smws.interalia.net/chat/jinora/node_modules/slack-utils/rtm.js:62:7)
  at Request.self.callback (/export/web/smws.interalia.net/chat/jinora/node_modules/request/request.js:198:22)
  at Request.emit (events.js:98:17)
  at Request.<anonymous> (/export/web/smws.interalia.net/chat/jinora/node_modules/request/request.js:1082:10)
  at Request.emit (events.js:117:20)
  at IncomingMessage.<anonymous> (/export/web/smws.interalia.net/chat/jinora/node_modules/request/request.js:1009:12)
  at IncomingMessage.emit (events.js:117:20)
  at _stream_readable.js:944:16
  at process._tickCallback (node.js:448:13)

Stopped working on Google Chrome

Google chrome (both desktop and mobile) suddenly stopped displaying the chat UI today. Only the top header is visible, rest all the UI components (chat messages list, message input box, side bar containing list of online users) are all gone!

It gives this warning in the console:
image

It works fine on Firefox, UC Browser and Edge.
PS: Chrome Desktop Version 63.0.3239.84 (Official Build) (64-bit)

Translation

Should we include translation in Jinora? Can we think of a good way to implement this (since this is a common chat platform)? Or is it too much effort?
screenshot from 2015-10-14 22 13 52

Ban Users

I think the right way to address this is to hellban users. This is the discussion I spotted yesterday on chat:

image

  1. Keep user sessions
  2. Ban sessions

Banned users are delegated to #public-hell channel, where only hellbanned users are talking. Moderators can have the public-hell channel muted and just check it occasionally to make sure banning is not too aggressive. Their messages don't reach anyone else other than that channel. You can unban users if they are not spamming any more, but this is the general idea.

See https://en.wikipedia.org/wiki/Stealth_banning

Parse Integration

Currently, jinora only stores the last 100 messages in memory using a circular buffer. We are planning to improve it, by shifting the data store to Parse.com

  • Store complete logs in parse as well as Slack
  • Allow viewing of older logs via parse
  • Storing the announcement in Parse as well (although I might use the Slack API and use the channel purpose/topic instead, which would be comparatively easier)
  • Maybe even add full text search using parse?

Only works to one side..

When deploying the App to Heroku, the seem to work but only in one way. I can post from Slack to chat window but Slack does not get anything from the Chat.
Everything seems to be right.. Incoming and Outgoing token, API token and all..
Any ideas?

Thanks,

Guy

Safari: no messages are displayed

On safari, no messages are displayed. In the console, the error "TypeError: template.async is not a function. (In 'template.async','template.async' is undefined) on polymer.js:36

Might be related to #12.

As experienced by @OlivierKamers.

`io.connect` function runs before the user enters the nick

This line in polymer.coffee runs before the user enter the nick, so onconnect function is called with an undefined nick on line 131 which in turns sends messages like undefined entered channel to the slack channel.
Also due to this it starts giving notification to the users about new messages without entering a nick.

Private Direct Messages

Would be great if it is possible to send a private message to someone in the channel.
Not sure how it can be done on slack, maybe with multiple bots? Or with one and a command like /msg

Redesign

We are working on a redesign for the v2. The first design was based on slate/slate by @tj, but we are doing a proper design for v2.

Here's the latest mockup:

ch67-01

@aviral125 is taking care of this.

SignUp Issue

It seems login/SignUp mechanism for the Jinora needs a fix. I just pressed "Esc" instead of entering a username for the chat and It still took me to the chat. At first I thought it is fine, maybe it won't let me post anything but when I tried to message something I found that it has given me some random name and prompted me that I cant use that name. and when I clicked OK, it posted my message with the same random name. Below are some screenshots:

http://imgur.com/a/u3as5

Notifications on new messages

In the current version, when users are on other tabs, they don't get any notification for a new message in jinora.

This can be solved by having a handler to update the page title in such a way, that it shows count of unread messages.
Tab-Notification

Currently, chat:msg events are being used to append a new message element in the DOM.
The same event can be used for this, with the help of a variable counting unread messages.

State of the tab can be used in this. Updating that variable to 0 when the tab is active and increasing it by 1, in case the tab is not active and there is any chat:msg event.

Login Screen

if there is a new design it would be great to have a login screen too insteaed of the popup box.

Online bots

Kindly remove online bots (#backdoor-irc) from the list of online users.

Firefox

There seems to be an issue on opening jinora in firefox. It doesn't show the messages.

Apply bad words filter before accepting the username

In the form in which a user is required to enter a username, any word is accepted. I was able to use even bad words (need examples ?) as my username. Then in the chat also bad words are sent to other users. This hinders a chat conversation. Some filter must be provided or else give user a preference to mask bad words in a conversation

Replace slack-utils with the slack package

The slack-utils package was written when there weren't many good clients for Slack available. However:

  • Jinora is the only app using it
  • It hasn't been maintained in quite some time
  • There are known security issues with the dependencies it is using

I've been trying to do a new release, but mocha is causing some issues with tests that I don't want to bypass: sdslabs/slack-utils#7

But even then, this would be a stop-gap measure, since slack-utils relies on Slack Legacy Tokens and not the new API. Using the new API would also give Jinora some super-powers like supporting multiple organizations easily with one-click installs.

Customize the title of landing page

Hi,

The title there is hardcoded, so it ends up showing chat with SDSLabs for all the instances.

Probably, the environment variable TEAM_DOMAIN can be used to customize it for others.

Jinora is awesome. โšก

Title Message

There should be a title message in jinora that is the same as team's public channel's title message.

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.