arjunmat / slack-chat Goto Github PK
View Code? Open in Web Editor NEWA support chat feature for your website that integrates with #Slack
License: GNU General Public License v3.0
A support chat feature for your website that integrates with #Slack
License: GNU General Public License v3.0
There are no docs describing it.
In help docs is written:
We support full customization of the chat text, colors, and default responses. Once you add the app to Slack, you'll can edit these settings which take effect immediately
How we can customize it?
As far as I've read the code, the new auto-created channels are supposed to have a random number. But currently, the channels created have no numbers, they only add "name"+"test-user". This makes it very likely for a user to repeat and see someone else's chat.
When using a private channel, there is a misleading text that says "optional".
In fact, at least one user must be added in the invite list, otherwise the chat won't open. It should say, required.
I'm concerned that the demo wants a user api auth token, which it then uses to build the chat. It works, which is really neat btw. I was about to install it on my site when something occured to me: What would stop someone from copying the js containing my auth token and using the auth token to inflict all manor of havoc on my slack?
Nothing?
It's not like the auth token is only good on one site or something. It'd be good anywhere anyone decided to use it. Perhaps the application tokens work differently. I haven't checked that yet.
When trying to implement the Hubot bot, because the slack chat connects without having any particular username or password, Hubot is not able to reply to any of the commands.
Is it possible to login with a specific user to Slack so that bots can also interact with the web visitors?
Hi there,
There's a potential that we will have multiple people trying to contact us at the same time, which would mean that them only using the same channel could be an issue.
So it would be an idea to be able to create a unique channel for a new user (e.g. based on the name they put in, and date, e.g. "16032016-john-smith" as a channel name.
Or, if this isn't possible, make it so that you can have 10 (for example) potential slack channels for live chat, and if channel 1 has had an update within the last 10 minutes, then channel 2 will get tried, and if that has been updated in the last 10 minutes, channel 3 tried, until channel 10.
Hello,
Love this integration, Just spend few hours, but worth it.
I have integrated Private Channel (It took some hours to figure out the php [ ] error and curl error in localhost php 5.3.x). Anyway I've fixed that.
Few Questions :
Thanks a lot
~Surjith
I don't get the online indicator to work. It is always orange…
Is there a trick or what do I have to keep in mind if the feature should work? Maybe a permissions thing?
I am using private channels btw. but also if I don't use the private function, it does not work…
Thank you very much!
I think I will do a pull request soon with some minor changes/fixed typo.
Is there a way to send the chat messages to Slack without the attachment that says ID, and other non-relevant data? It would be much easier to just read the message itself, to chat comfortably.
As a client user, I would like to have support chats with anyone in the slack channel, but only see relevant messages for me, so that I can keep my personal chat focused and directed to me.
As a slack chat user, I would like to be able to read through all the client slacks and provide "1 on 1" support, so that I can gain the knowledge and allow the client to feel like they are getting personal attention.
Thoughts?
Hi, I was wondering, how to set it up in the correct way.
Im filled out the slack infomation in the slack-chat.js.
And include the slack-chat.js in my page.And call $().slackChat(slackChatOptions);
It doesnt show anything..Do I set up in the wrong way??
Anyone give me some detail for setting it up?
When a message is submitted from the webpage the message shows up on my slack account, but doesn't display in the message area on the web page.
Isn't working in the demo or in slack-chat integrated into my site.
Here is the code from my site. Demo code is untouched from zip download.
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href="css/slack-chat.css" rel="stylesheet" />
<div class="message-box" data-uk-tooltip="{animation:true,pos:'top-left'}" title="Need help?">
<a href="javascript:void(0);" class="message-box-icon">
<i class="uk-icon-comment uk-icon-large"></i>
<div class="uk-badge uk-badge-danger uk-slack-message-count"></div>
</a>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script type="text/javascript" src="js/slack-chat.min.js"></script>
<script>
var slackChatOptions = {
apiToken: 'xoxb-54251576438-97qNaEaNVWr8p7FGgJTDdTjM', //#Slack Auth token. Required.
channelId: '#helpdesk', //#Slack channel ID. Required.
user: '<?php echo $loggedInUser->displayname." ".$loggedInUser->lastname; ?>', //name of the user. Required.
userLink: 'http://localhost:8800/admin_user.php?id=<?php echo $loggedInUser->user_id; ?>', //link to the user in the application - shown in #Slack
userImg: '', //image of the user
userId: '<?php echo $loggedInUser->username; ?>', //id of the user in the application
defaultSysImg: '', //image to show when the support team replies
defaultSysUser: '', //Required.
queryInterval: 3000,
chatBoxHeader: "Need help? Talk to our support team right here",
slackColor: "#36a64f",
messageFetchCount: 100,
botUser: '@support', //username to post to #Slack. Required.
sendOnEnter: true,
disableIfAway: false,
elementToDisable: null,
heightOffset: 75,
debug: false,
webCache: true,
privateChannel: false,
serverApiGateway: '/server/php/server.php',
useUserDetails: true
}
$('.message-box').slackChat(slackChatOptions);
</script>
Can you provide an npm version?
awesome work! -
right now I am unable to get multiple slack users invited to a private channel.
perhaps I am not forming the user list correctly?
I've tried user names, user IDs, complete user links, everything I could think of. in quotes, comma separated. no luck.
now I am getting the following error in the server.php log:
[26-Sep-2016 16:04:32 America/Chicago] PHP Warning: Invalid argument supplied for foreach() in /server/php/server.php on line 69
line 69 calls the array of users to invite them:
foreach($invitedUsers as $user) { $chInvite = curl_init(SLACK_API_INVITE_URL);
etc.
I am stuck!
(adding the default token user if no array is specified works great now, but I can't add others)
When slack-chat is destroyed and instantiated again, all messages are duplicated.
This is a problem with the destroy function in the plugin. The click event is not being unbinded, which leads to duplicate messages.
changing user ids to user names or user real names for response messages with an undefined subtype
When selecting a created channel, chat works fine. But, when the private channel option is enabled, the messages are sent twice on the webchat. Slack only shows it once.
Hi,
i tested the demo and it found all my channels but it couldn't send a message, the console said channel not found?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.