Fastblox - utilizing javascript SDK for group chatting

I've been facing issues setting up a group chat using QB Javascript SDK.

There are a few problems I am encountering: Firstly, I consistently receive a "room is locked" message. Here's the link to the screenshot: https://i.sstatic.net/auR21.png. This is confusing as on the server side, the room is configured as a public group and not a private chat.

Secondly, it appears that only one user can log in at a time. - When I log in with the user "John," I get the "room is locked" message but can still use it fine. - However, when I try to log in with another user "Doe" on a different browser or device, there are no events triggered. - If I logout both users and then log in with "Doe," it works smoothly.

My assumption is that only one user is supported in the starter version simultaneously. Can someone provide clarification on this?

The code I'm using is adapted from . The modifications are mainly related to appid and custom events while keeping the core structure intact.

You can access my implementation here:

When I login as John, I encounter the following scenario:

https://i.sstatic.net/PPDPN.png

If I then attempt to login as Doe immediately after, I only see a message stating "doe has logged in" without any functionality.

However, if I logout both users and only login as doe, everything works correctly - trying to log in as john at that point fails.

Would appreciate any guidance on resolving this issue.

Answer №1

We regret to inform you that the chat sample you are currently using is outdated and no longer supported. However, we have released a new version of our JS SDK which eliminates the need for any additional plugins.

To access the latest version of our SDK, please visit:

Unfortunately, we have not yet updated the sample. In the meantime, you can utilize the following code snippets:

You may also refer to this example for creating a group chat: https://gist.github.com/AndreyPovelichenko/37e40b338279f59b3fbd

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Guide to integrating a deterministic game loop with tick-based mechanics

My current project involves creating a "simple" 3D game using Three.js and incorporating a network framework for multiplayer functionality in the future. After some research, I found that many "action" games utilize a "tick" based game loop to sync clients ...

Attempt to import Recharts into React was unsuccessful

I am currently exploring the use of recharts in a React project, but I am facing difficulties when trying to import components from its library. I have added it to my package.json file as follows: "recharts": "^2.0.9", However, I am ...

In this JavaScript code, learn how to organize an array based on its numerical property

What is the best way to organize an array based on the 'num' property in this JavaScript array? var data = [{ 005: { `num`: 1360487}, 047: { `num`: 2519472}, 061: { `num`: 1559115}, 081: { `num`: 2232710}, 085: { `num`: 54956 ...

Can Firebase data be updated in real-time in a Vue app?

Utilizing Firebase for Authentication and integrating a database into a Vue app, my current task involves monitoring changes within a 'friends' collection specific to a user. The objective is to seamlessly display the list of friends while refle ...

What is the reason for index always being not equal to 0?

<script> var index = 0; $.getJSON("./data/data.json", function(json) { $.each(json, function(data) { var html = ""; if(index == 0) { console.log(index + " fir ...

Encountering a "Element is not defined" error in Nuxt when trying to render Editor.js and receiving

I've been working on creating an editor using Editor.js within my Nuxt project, but it seems like the editor isn't initializing properly when I render the page. import EditorJS from '@editorjs/editorjs'; interface IEditor { editor: E ...

Send data in JSON format from an AngularJS client to an Express server

Having an issue when trying to send a JSON Object from an AngularJS $http service to an Express Server. The server receives an empty object: "{}" I've looked at this topic, but it hasn't resolved my problem: angular post json to express This is ...

"An error message stating 'Express: The body is not defined when

I'm encountering an issue while trying to extract data from a post request using express. Despite creating the request in Postman, the req.body appears empty (console.log displays 'req {}'). I have attempted various solutions and consulted s ...

Enclose elements in a div using a jQuery each function

I have successfully parsed data from an XML feed to JSON, but now I want to wrap each part of the data within a div. Here is the code snippet I am working with: var newsDiv = $('<div class="news-feed">').appendTo($("body")); $(release ...

Retrieve an item from a mapped array

Currently, I am using the following code snippet console.log('errors: ' + password.get('errors')); to check the output from password.get('errors'));, and in the console, the response is as follows: List [ Map { "id": "validat ...

What could be causing my .vue component to be undefined?

I've encountered an issue while using parcel-plugin-vue to compile a basic .vue component from a file. The compilation process seems to be running smoothly with no errors, but when I try to view the page in my browser, it appears blank without any con ...

What possible reasons could be causing the code to not run after my for loop?

<script> //grab all the input values when submit button is clicked const sub = document.getElementById("sub"); sub.addEventListener("click", (e) => { e.preventDefault(); //get input values var ...

Retrieve the name of the product from the corresponding parent element

My goal is to trigger an alert box with the product name when the "Buy now" button is clicked. I have added the necessary code in jquery to maintain the onclick event of the button. <h2 class="product-name"><a href="product1.php" title="Sample Pr ...

Tips for moving and filling data in a different component using NextJS

Currently, I am developing an application using Next.js and tailwindcss. The Issue In essence, I have a table consisting of 4 columns where each row contains data in 3 columns and the last column includes an "Update" button. The data in each row is genera ...

Uploading files in React.js using Yii2 API

I am working with react.js (version 15) and I need to upload files using yii2 api. Here is my code: My component in react: import React, { Component } from 'react'; import Header from './Heaader'; /* global $ */ class New ...

Error: missing semicolon prior to the statement

I am looking to create a Java web application that includes a JSP page. However, when I load the page, I encounter the following error: SyntaxError: missing ; before statement The code for my JSP page is as follows: <%@ page language="java" contentTy ...

Tips for effectively reusing the modal component in Vue.js without encountering re-render issues

I'm encountering an issue where the same component content is being rendered despite having different components (Rendering problem). I have a reusable modal component called modal.vue, so every time I create a new component, I call the modal compone ...

What is the best way to incorporate an image that appears when a user clicks on a

My goal is to dynamically place an image exactly where a user clicks on the webpage. Currently, I have the following code, but it only adds the image at the top and continues to do so repeatedly...not appearing at the clicked location. <html> ...

AngularJS efficiently preloading json file

I am just starting to learn about angularJS. Apologies if my question is not very clear. Here is the problem I am facing: I have a JSON file that is around 20KB in size. When I attempt to load this file using the 'factory' method, I am receivin ...

Guide to generating customized CSS styles on-the-fly in Vue (similar to Angular's dynamic styling capabilities)

When working with Angular, we have the capability to dynamically set CSS properties. For example: <style ng-if="color"> .theme-color { color: {{color}}; } .theme-background-color { background-color: {{color}}; } .theme-border-color { border-color: { ...