Chat

Learn how to manage dialogs and messages.

Chat is one of the core features of QuickBlox. Here, you will learn how to create and manage dialogs and messages via the Dashboard. You will also learn how to set up automatic push notifications for offline users.

Visit our Key Concepts page to get an overall understanding of the most important QuickBlox concepts.

View list of dialogs

To view a list of dialogs, follow the steps below:

  1. Navigate to the Dashboard => YOUR_APP => Chat tab.
  2. Use a Search area to view a dialog by dialog ID, dialog name, occupants IDs, last message, etc.
2374

Create dialog

To create a dialog, follow the steps below:

  1. Navigate to the Dashboard => YOUR_APP => Chat tab.
  2. Click the New Dialog button.
  3. Enter the name of the dialog into the Name field.
  4. Enter a photo ID/UID or URL of the photo.
  5. Specify if the dialog is a group or public group.
  6. Specify IDs of opponents who are going to participate in the dialog (for group dialog only).
  7. Click the Create button.
1864

Let's see what capabilities an account owner has with regard to the dialog type.

CapabilitiesPrivateGroupPublic
Create dialog

Update dialog

To update a dialog, follow the steps below:

  1. Navigate to the Dashboard => YOUR_APP => Chat tab.
  2. Click the ID of the dialog in the ID column.
  3. Update dialog fields.
  4. Click the Save and close.
1544

Let's see what capabilities an account owner has with regard to the dialog type.

CapabilitiesPrivateGroupPublic
Update a dialog name
Update a photo
Add occupants
Remove yourself
Remove occupants
Update custom parameters

📘

If an account owner removes a dialog occupant, the occupant ID is removed from the occupants IDs list of this dialog. As a result, the dialog is removed from the user's list of dialogs. However, the dialog remains in the history of other users who are still present in the occupants IDs list.

Delete dialog

To delete a dialog, follow the steps below:

  1. Navigate to the Dashboard => YOUR_APP => Chat tab.
  2. Find the dialog. You can use the search or just locate it in the list of dialogs.
  3. Check a dialog you want to delete.
  4. Click the Remove selected.
2364

Let's see what capabilities an account owner has with regard to the dialog type.

CapabilitiesPrivateGroupPublic
Delete dialog for all users

View messages history

To view messages history, follow the steps below:

  1. Navigate to Dashboard => YOUR_APP => Chat tab.
  2. Find the dialog. You can use the search or just locate it in the list of dialogs.
  3. Click the View button in the History column.
2420

Delete message

To delete a message, follow the steps below:

  1. Navigate to Dashboard => YOUR_APP => Chat tab.
  2. Find the dialog. You can use the search or just locate it in the list of dialogs.
  3. Click the View button in the History column.
  4. Check the messages you want to delete.
  5. Click the Remove selected button.
2790

Enable offline messaging

Send notifications about new messages to the user when their app is not running by using offline messaging functionality. This functionality allows to customize automatic push notifications displayed on a user's device when they are offline. In other words, if your opponent is offline when you are writing a message, they automatically receive a push notification.

📘

Make sure to subscribe your users to pushes using SDKs. Review Push Notifications section for more details.

🚧

Only FCM data messages can be sent from the Android app. QuickBlox doesn't support FCM notification messages.

To process FCM data messages in your app when the app is in the background, you need to handle them. If not handled, they will not pop on the screen even if the app has received such push notifications. See FCM documentation to learn more about data messages.

Enable offline messaging from the Dashboard as follows:

  1. Navigate to the Dashboard => YOUR_APP => Chat => Offline messaging page to locate offline messaging settings.
  2. Check the Enable automatic push notifications for offline users if you want to receive push notifications from the server automatically.
2310

Configure offline messaging template

You can configure an offline messaging template from the Dashboard as follows:

  1. Navigate to the Dashboard => YOUR_APP => Chat => Offline messaging page to locate offline messaging settings.
  2. Choose the template in the Templates section.

📘

Available for Growth/HIPAA Cloud/Enterprise plan

You can set the custom template in the Offline messaging text section using the following template variables:

  • %unread_count% - total number of new messages the recipient has
  • %plural[new message]% - words in brackets (20 characters max) will be pluralized based on unread messages count
  • %body[x]% - quote x characters from message body
  • %recipient_fullname% - full name of recipient
  • %sender_fullname% - full name of sender
  • %recipient_login% - login of recipient
  • %sender_login% - login of sender
  • %dialog_name% - name of chat dialog (will be replaced with "Private dialog" string for 1-1 messages)
  1. Set the Badge counter to include counter info into your push message. Useful to include an unread counter that is the number of unread messages a user has.
  2. Set a push notification sound in the Sound section (for iOS only).
  3. Set the Category (iOS) field. Enter "actions" that should be presented in the app notification in various views (for iOS only).
  4. Enable the Content Available option to indicate that new content is available (for iOS only).
  5. Enable the Mutable content option to modify the content of newly delivered notifications before the user is alerted. Use a notification service app extension to be able to modify the content of the notification. If the option is enabled, the system passes the notification to the service app extension for the subsequent modification of the notification payload before the actual delivery (for iOS only).
  6. Click the Save button.
1848

🚧

Currently, push notifications are supported in a mobile environment only.

Ban user

You can ban a user account so the user can no longer connect to the chat. See the ban user page to learn how to ban a user.


What’s Next