rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

change title of group chat #147

Open lilling opened 4 years ago

lilling commented 4 years ago

Hey! You have a gr8 module here! (I'm the 92 ⭐️)

do you have an option to change the group chat title so it wouldn't show participants' names rather the topic we are discussing?

rpaschoal commented 4 years ago

Hi @lilling , thanks!

Not at the moment. If you check the following class you will realize how the group title is currently set: https://github.com/rpaschoal/ng-chat/blob/master/src/ng-chat/core/group.ts

fouzianigarsultana commented 4 years ago

Hello, I have tried ng-chat and am new in socket.io world. I am trying to create friendlist with specific user group whose data will render from database. But I am not abling.Would please advice me my list is like this: `router.get("/chat", (req, res, next) => { ALUser.find({ $and: [{ uniname: { '$regex': req.query.uniname, '$options': 'i' } }, { dept: { '$regex': req.query.dept, '$options': 'i' } }, { session: { '$regex': req.query.session, '$options': 'i' } } ] }).then(data => { res.status(200).json({ message: "Users retrieved successfully!", alusers: data }); }); }); var usersCollection = []; app.post('/alumnichat', function (req, res) { var clonedArray = usersCollection.slice();

// Getting the userId from the request body as this is just a demo // Ideally in a production application you would change this to a session value or something else var i = usersCollection.findIndex(x => x.participant.id == req.body.userId); clonedArray.splice(i, 1); res.json(clonedArray); });`