papercups-io / papercups Goto Github PK
View Code? Open in Web Editor NEWOpen-source live customer chat
Home Page: https://app.papercups.io/demo
License: MIT License
Open-source live customer chat
Home Page: https://app.papercups.io/demo
License: MIT License
For privacy reasons there should be the possibility to delete a conversation from the server.
[Edit from @reichert621]
Before we can fully support this, we'll need to fix some foreign key issues... namely, when a conversation is deleted, we should probably auto-delete all associated messages/slack threads/etc
See this comment: https://elixirforum.com/t/an-open-source-alternative-to-intercom-drift-etc/33450/4
I'm not too familiar with XMPP, but wanted to kick off a discussion thread here so I don't forget about it :)
When a person messages a closed message it should reopen the closed message. Right now it doesn't reopen and the message disappears.
Right now if you type in more than one line it starts scrolling
Integrate with Telegram, be able to reply through telegram
Right now user invitations (from user_invitations
table) never get deleted, but we should delete them after they are successfully used.
This is where we currently use it: https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/controllers/registration_controller.ex#L14
If the registration is successful, the user_invite
record should be deleted.
It would be nice if the message time in the chat were real-time, you can archive that using a library like timeago.js, they support real-time render.
Since we currently get very little info on the anonymous customers that interact with the chat widget, we save their IP addresses (so we can eventually do a location lookup)
At the moment, we use conn.remote_ip
(https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/controllers/customer_controller.ex#L17), but this ~seems to only return private IP addresses.
Investigate this as a possible solution? https://www.cogini.com/blog/getting-the-client-public-ip-address-in-phoenix/
...so that when we respond from Slack, it knows who to show in the chat widget.
I'm hoping there's a "clever" way we can just match based on email, but if not we may need to set up a little UI to do it manually :/
(currently we just fall back to showing the sender as whoever the user was that set up the Papercups account)
(This might be an issue in https://github.com/papercups-io/chat-widget)
Sometimes when we receive messages in the dashboard, we get duplicate conversations created with the same message (or empty messages)
Need to figure out the best UX for this -- didn't want the message disappearing to feel too jarring, but don't want it to feel slow either... maybe just a quick animation?
Currently for the hosted version every deploy triggers a re login
Right now if a customer goes offline and we respond, they won't see the message unless they come back to the page and open the widget -- would be nicer if they could get answers to their questions/comments via email if possible.
I would like to see (and contribute to) an integration with Webex Teams. Similar to Slack, i think this could be a great connectivity option for many organizations.
Having to press the send button every time is tedious. We should support cmd + enter and ctrl enter for windows equivalent shortcuts. We shouldn't have enter by default since longer messages you might want multiple lines and you don't want to accidentally send
Hello again, writing up info from discord convo with Alex.
Use case, Jane Smith has logged into my SASS app, I'd like to be able to pass in the following to the JSON snippet/metadata if possible... guessing this is on your roadmap if this would be possible - #107:
first_name: Jane
email: [email protected]
user_id: 'ff71ef5f-91c9-4971-9619-36dccdb5e055'
subscription_level: pro
team/group/workspace_name: Acme Co
team/group/workspace_id: '4e2aa643-2b92-4f03-8fb8-f5aefe799594
registration_date: 2020-08-12T19:42:22Z
Extra bonus:
Notes
As a client success rep
I want to pre-identify users I'm chatting with
So that I do not have to ask them for baseline context of who they are
Users want the ability to set working hours and automatically prompt for Email address when they are away.
I'm trying to run papercups on a different port than 4000. I set the env var PORT the port to 8080, and started the server using mix phx.server
, on the prod configuration
When the server starts, I get this error:
root@papercups-684699d878-57j66:/usr/src/app# export PORT=8080
root@papercups-684699d878-57j66:/usr/src/app# mix phx.server
[info] Running ChatApiWeb.Endpoint with cowboy 2.8.0 at :::8080 (http)
[info] Access ChatApiWeb.Endpoint at http://localhost:8080
Something is already running on port 8080.
No matter the port I put in, it fails. If I remove the part of the code that's reading from an env var, and hardcode port 8080, it all works fine.
Any ideas?
When a user enters the wrong confirm password on registration page we should tell them that it is miss matched on the browser side
We'll keep this page simple for now... just a profile page with:
Let's create a new table user_profiles
to store this data, with a name
string field and a profile_image_url
string field, along with a user_id
reference to the users
table.
Implement these API endpoints:
GET /api/profile
- fetch the current user's profilePUT /api/profile
- update the current user's profileI was trying to run the project using docker-compose but there is a problem Papercups image does not exist in the docker hub and it will fail to run.
https://github.com/papercups-io/papercups/blob/master/docker-compose.yml#L5
I believe that we need to build and push the latest image, based on repo tags to the docker hub using Github Actions or any other CI service.
(Instead of just an auto-incrementing integer)
We should either make this more clear, or just allow invite URLs to be used as many times as people like until they expire
This will require some tweaks to https://github.com/papercups-io/chat-widget to send over the customer_id
when connecting to a socket. Once that's setup, we can start using Presence to detect when a customer is online, and use a little green badge or something to indicate so in the dashboard.
When you send a message from a new browser or incognito the first messages is much slow the normal.
During account creation we first create the account then the user. If the user creation fails then you will have an account thats created without a user attached.
Repro:
Register for account
Enter mismatch passwords or empty fields
There would be a new account created in the table but no users associated.
We currently have a "settings" icon for the "Logout" button in the dashboard:
Here's the line it's on: https://github.com/papercups-io/papercups/blob/master/assets/src/components/Dashboard.tsx#L143
Find a more appropriate icon here: https://ant.design/components/icon/
And then import in here https://github.com/papercups-io/papercups/blob/master/assets/src/components/icons.tsx before replacing the existing icon
If a user starts a conversation in one Slack channel, and then reconnects their account to a different Slack channel, the following messages in that conversation thread get messed up.
We need to either:
Option 1 makes it easier to see the history of a thread, but Option 2 still seems better (I wouldn't want to have to keep going back and forth to old channels, but maybe this is inevitable either way...)
Hello,
I couldn't find a way to disable registration after creating the initial account (also tried to look through the source/docs).
Is there a way to prevent anyone from creating a new org on my deployment?
If it hasn't been build/spec'd yet, here's a potential direction:
As an Admin
I want to restrict outside registration
So that my instance of papercups is secure
Options:
REGISTRATION_DISABLED=true
that would default to false if not set (might be the quickest V1)Other considerations:
Like the direction & plan to use this 🤓
If you plan on self-hosting Papercups, you'll need to set up your own Slack app if you want to handle messaging through Slack.
https://YOUR_APP_HOST/api/slack/webhook
https://alex-papercups-staging.herokuapp.com/api/slack/webhook
message.channels
bot eventmessage.channels
user eventhttps://YOUR_APP_HOST/integrations/slack
https://alex-papercups-staging.herokuapp.com/integrations/slack
channels:history
channels:manage
chat:write
chat:write.public
incoming-webhook
channels:history
export PAPERCUPS_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
export REACT_APP_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
export PAPERCUPS_SLACK_CLIENT_SECRET='YOUR_CLIENT_SECRET_HERE'
config
:heroku config:set PAPERCUPS_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
heroku config:set REACT_APP_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
heroku config:set PAPERCUPS_SLACK_CLIENT_SECRET='YOUR_CLIENT_SECRET_HERE'
/integrations
path in your dashboardThat should be it! Feel free to open an issue if you have any problems getting set up :)
For API endpoints that should be secured (e.g. these: https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/router.ex#L52-L56) we need to make sure we're always limiting the data returned to the current user's account_id
The account id can be accessed on conn.assigns.current_user
in each request like so:
https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/controllers/conversation_controller.ex#L11 (there are probably more idiomatic ways to do that, but this works for now 🤷♂️ )
Here's an example of filtering by account_id
in one of the contexts: https://github.com/papercups-io/papercups/blob/master/lib/chat_api/messages.ex#L21
The user_invitation
table has an expires_at
field which should be taken into account when signing up. If the invite has expired, throw an error and let the user know.
There are no notifications for closed conversations in the dashboard. Only an email is sent. Closed conversation notifications should still be displayed.
Alternatively, closed conversations should no longer be displayed in the client and a new conversation should be started.
Maybe give this a shot? https://marked.js.org/#/README.md
This could also work: https://github.com/rexxars/react-markdown
First goal would just be:
**Hello** _world_ www.papercups.io
Instead of doing a create_or_update
for our user profile, user settings, widget settings, it might make more sense to just create these initial records when a user signs up for the first time and just do updates
in the future.
See this thread: #74 (comment)
I have an almost-functioning Dockerfile, happy to contribute it if this is something you are interested in supporting.
Hi papercups!!!
came from HN, and I just LOVE your work
just wanted to say thanks for democratizing chat widgets, really means a lot for the internet community in general honestly
I just wanted to inquire about the pricing model for the hosted version, since I'm looking to migrate from Hubspot.
Is there a general ballpark on how much the hosted version will cost a month for the enterprise?
Thanks!
See https://hexdocs.pm/ecto/test-factories.html
Currently a bunch of our tests have the same boilerplate code... let's try to DRY it up with factories!
Need to make our prioritizations a bit more clear
Support for some kind of (web)hooks, for example when a chat is initiated and perhaps email has been entered, initiate hook which might return a list of orders from that customer (visible to the agents only, of course).
Or whenever a message is sent/received, a hook could look at the message and provide additional data (a simple regexp on the message might detect order numbers (x characters long and only numbers) which could then provide the agent with a direct URL to the order in the (ecommerce) backend.
chatMessage
" API: https://docs.microsoft.com/en-us/graph/api/channel-post-message?view=graph-rest-1.0&tabs=httpSome folks have requested this integration, so let's do some investigation into how difficult it would be. (It sounds like it shouldn't be too difficult.)
Maybe see our Slack integration for some inspiration? https://github.com/papercups-io/papercups/blob/master/lib/chat_api/slack.ex
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.