Giter Club home page Giter Club logo

chat-service's People

Contributors

an-sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chat-service's Issues

Get socket id(s) from username

Firstly, thanks for making this library @an-sh !
I want to get a list of connected socket id corresponding to a particular username(used during connection from the client)?

Additional Details:
I am trying to add a person to an already created room from the server-side, but I am unable to do that without the socket id. Is there a different approach to this?

Feature request: Message deleting in chat rooms.

As expected behaviour, there should be an api, that provide room users an opportunity to delete chat messages, hiding them from users but keep it in store with 'deleted' flag or something similar. And it will be great if owners and admins can see all room messages, including deleted ones.

How to use CommandHooks or how to handle rpc calls

Hi,
I'm continuing to use CS.
I want to add chatroom whenever the user wants to, thus running this on the client:
this.socket.emit('roomCreate', roomName, false);
However I now want to handle the doubled roomnames.
I found that there are CommandHooks like roomCreateBefore/After, but I'm a bit confused on how I can use them.
What I tried was this:

instance.chatService = new ChatService(cs_config,
            {
                onConnect: utils.onConnect,
                roomCreateBefore: utils.roomCreateBefore
            });
//in module utils
roomCreateBefore(server, otherarg) { 
        console.log('got to roomCreate: ' + otherarg);  //-> got to roomCreate: undefined
        //Stuff like if server.hasroom do this else that. 
        return Promise.resolve();
 }

Now onConnect works fine because it is part of the HooksInterface where the parameters are exposed.
But I dont know how I get the 'roomName' parameter of the event roomCreate.

roomCreateBefore(execInfo, cbopt) โ†’ {Promise.<(Array|undefined)>}

I know about the execInfo from the docs aswell but I dont know where to get that and how to use it.
So to sum my question up:
How do I handle rpc events from the Client, and if the solution involves CommandHooks, how do I use them properly.

Nest.js support

How do we implement this library in NestJS. Should it be a gateway or custom provider?

Production ready ?

Hello,

We are building a chatroom ecosystem of applications and we are looking for a simple solution for handling all the messaging infrastructure. We have been evaluating multiple third party solutions but non of them match with our requirements and pricing budget.

chat-service seems to be a really good candidate for our use case, is anyone using this in production ? Do you have a roadmap for the product ?

Thanks before hand!

Very nice chat-service

It would be great if you'd also support SockJS. Is that a lot of work and is it even possible, because it doesn't support rooms out of the box?

I also have the following.

Suppose every user has its own room which is named as its username. This user is the admin and owner of this room. From the docs I read that the creator of a room is also the admin/owner. But I don't want this. I want that every user can join/create a room, but it isn't automatically the admin/owner. Only the user whit the same username of the room is the owner/admin. So any user can create a room with a certain username, but it isn't automatically the owner/admin. Only the user with the same username as the roomk can be the owner/admin.

similar projects

hi, great project :) do you know about similar node-js projects? i mean pluggable multiroom multiuser chat server?

Persisting roomMessage listeners

Hi @an-sh ,
I am trying to implement slack like chat application where an user will have multiple chatrooms created. As far as I understand, the client needs to be joined in a room to be able to listen for event inside the room.

My question is what is the best way to let a client know that a new message was received in any of the rooms the client is a part of?

In order to achieve this, do I join each room while initializing the client web app by looping over the roomId(s) from dB, or is there a standard way to achieve this.

There can a lot of rooms (~100) a client will be a part of at a given moment. So, Is there a hard limit to the number of room a client can join?

Online User Presence

Hey @an-sh ,
Is there a way (API or technique) to know if a user is online in a room?
Even though the readme states that there are possible APIs for the same, I could not find any code that documents the same. Would be great if you could shed some light on this front.

What is stored where and how?

Nice package here!
I was wondering how all the data is stored. Background are the following questions:

  • Where is everything stored exactly? On my server? Some other server? In some files/db? In memory? If my server completely shuts down, can Chat-service still recover or only if the chat-service process is down?
  • What do I need to store in a own database to ensure proper functionality of the service, even by a full server shutdown etc.?
  • While we are at it: Is there a way to initialize Chat-service based on the contents of a DB? Or do I need to repeat each client Request? Can I export the stores of Chat-service so I can initialize Chat-service based on them?
  • What is the maximum memory of Chat-Service? (Considering a very high number of Messages in a Room)

Thank you ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.