Skip to content

Brief demos with the Chat SDK for use with How-To documents

License

Notifications You must be signed in to change notification settings

PubNubDevelopers/Chat-SDK-How-Tos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat-SDK-How-Tos

Simple demos showing how to use specific aspects of the Chat SDK

Demo Code Description Hosted Demo
User Channel Membership Shows joining and leaving channels as well as membership events. Accompanying how-to: How to Manage User Channel Membership. Hosted Demo
Add Reactions and Emoji to Messages Show how to add, remove and manage message reactions. Accompanying How-to: How to add Reactions and Emoji to Messages Hosted Demo
Create Threads and Quote Messages Start a message thread, contribute to that thread and quote messages on that thread. Accompanying How-to: How to Create Threads and Quote Messages Hosted Demo
Mention Users and Channels Tag @Users and #Channels to give them context, allowing the recpient to take action such as hyperlinking to that user's profile. Accompanying How-to: How to Mention Users and Channels Hosted Demo
Moderate & Report Messages Coming soon... Coming soon...

Usage Notes

These demos are designed to be used within their accompanying how-tos (see the links in the table at the top of this ReadMe) which will include instructions and context .

Installing / Getting started

To run any of these projects yourself you will need a PubNub account

PubNub Signup

Get Your PubNub Keys

  1. You’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys from the PubNub Developer Portal.

  2. Sign in to your PubNub Dashboard.

  3. Click Apps, then Create New App.

  4. Give your app a name, and click Create.

  5. Click your new app to open its settings, then click its keyset.

  6. Enable the Presence feature on your keyset (check 'Presence Deltas' and 'Generate Leave on TCP FIN or RST')

  7. Enable the Message Persistence feature on your keyset and choose a duration

  8. Enable the Stream Controller feature on your keyset

  9. Enable the App Context feature on your keyset. Make sure you check all the checkboxes related to events, i.e. User and Channel Metadata Events as well as Membership Events. Depending on which demo you are using, you may also need to uncheck the two 'Disallow Get all User / Channel Metadata' options.

  10. The hosted variant of this app uses Functions for moderation, specifically https://www.pubnub.com/integrations/chat-message-profanity-filter/.

  11. Copy the Publish and Subscribe keys and paste them into your app as specified in the next step.

Building and Running

  1. Clone the repository

  2. Replace the hard coded Pub/Sub keys for each demo with your own keys you generated in the previous step. The hardcoded keys used by the demos are restricted to the specific user IDs and channels defined by the demo, so you will need your own keys to build your own app.

git clone https://github.com/PubNubDevelopers/Chat-SDK-How-Tos.git
cd Chat-SDK-How-Tos
cd <sample>
yarn
yarn start

Contributing

Please fork the repository if you'd like to contribute. Pull requests are always welcome.

About

Brief demos with the Chat SDK for use with How-To documents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published