 {
    console.log("0000000");
    if (websocket!= null) {
        websocket.send(msg,_nicknname,_photo);
    }
    msg = "";
}

Web Socket ChatEndPoint.java: 
@OnMessage
public void deliverChatMessege(Session session, String msg,String _nickname,String _photo) throws IOException{
    try {
        if (session.isOpen()) {
           //deliver message
           ChatUser user = chatUsers.get(session);
           doNotify(user.username, msg, _nickname,_photo, null);
        }
    } catch (IOException e) {
            session.close();
    }
}

I was thinking about a way to pass the message, nickname and photo Json-like from JavaScript but I don't know how to get it in the side of the web socket server.
Am I missing something? 
Please help me.
Thanks

A: With a send method you can only send strings (see docs). However, you can send a JSON object if you use JSON.stringify. Then in the server you can decode the string and you will have your data.
Example
function sendMessage() {
    console.log("0000000");
    if (websocket!= null) {
        var data = {
            msg: msg,
            nickname: _nickname,
            photo: _photo
        };
        websocket.send(JSON.stringify(data));
    }
    msg = "";
}

It’s okay not to be okay. We all know this by now, right? Yes, it would be lovely to be constantly happy with a smile on our face all day until you realise it isn’t humanly possible.
I think I have a pretty positive outlook on the world, but I can’t deny the phases of depression that I’ve been through. The sadness, the grief, the feeling of isolation in a busy room. But those experiences have contributed to who I am today, everything happens for a reason.
 A disorder that causes a permanent and lasting feeling of sadness and loss of interest. Depression isn’t just having a bad day, and you can’t just ‘cheer up’. It affects your feelings, thoughts, and behaviour and can lead to further physical and emotional problems. Depression interferes with the normal functioning of your life, and simple day-to-day tasks become a problem. As a result, you may question the reason for living.
You may also experience the extremes. High with happiness versus doubting the world will ever have colour again. And the worst part? Admitting to yourself that you have a problem. Lots of people will hide it behind their best fake smile.
Mental disorders can be difficult to diagnose; they’re not physical, and you can’t see what’s wrong. You may be having a night out with a mate who’s going through depression, but you wouldn’t get the slightest hint of what they are going through.
Depression has no face. Anxiety has no face. Bipolar has no face. There is no one look that someone can point out in a crowd. Mental illness comes in every shape and form, every colour, at different times in people’s life. There won’t necessarily be any outward signs of the condition, but this doesn’t make it any less real.
Most people struggling with depression will have a heavy heart and feel hopeless. A common experience for those suffering is to feel like there is no way out of the void they’ve fallen into. They think they cannot open up or talk to anyone, like they are alone. This is not true, there is always someone.
A person suffering from depression may not look like they are because the modern man isn’t expected to act like he’s depressed. Enter the stereotypical tough guy. We are encouraged to carry on as best we can every day, no matter what’s happening on the inside. I bet if anyone was asked what coronavirus or cancer is, they’d have an accurate answer; but depression, the number one mental health illness that affects millions the world over, a lack of education would give a blank response, which is both sad and scary.
The perception that depressed people have a constant frown, no self-care, an unsuccessful life, or are in a state of failure is so far from the truth. Famous people, including Robin Williams, Kurt Cobain, Avicii, and Amy Winehouse, can prove this theory wrong. Because of the world’s negligence of mental health and the stigma attached, the world has lost many beautiful souls, some I knew personally.
“If my eyes could show my soul, everyone would cry when they saw me smile.” - Kurt Cobain.
Depression can range from mild to moderate to severe. Check out some of the symptoms below and keep your eyes, and mind wide open for tell-tale signs.
You may not be able to fully stop depression from raising its ugly head, but there are things you can do to try and safeguard yourself.
• Start new habits and routines in your life.
• Don’t shy off before seeking professional help. Your mental health is important.
• Reach out to a friend or family member and talk. It will help you release your mental load.
• Be regular with your medication. It helps you regain your lost chemical imbalance.
• Live a healthy life with regular exercise, good food, and restful sleep. These are important ways to fight depression.
• Take time to relax and breathe. Maybe try meditation.
• Write down your feelings and moods and track your journey. This will help your mind deal with it and be a great defence should you ever feel like you are relapsing.
We must start valuing our mental health. It’s more than a weakness you can snap out of, and it’s more than a bout of the blues. Depression is a battle that can’t be fought alone. There is a lack of communication and knowledge around the subject, and the irony is that while we are constantly avoiding the topic of mental illness, the percentage of the population experiencing issues across the world is increasing.
If you’re experiencing even the slightest symptoms of depression, be sure to reach out to your someone or seek professional help from your GP or clinic. You can also reach out to us here at MESOA.import { ConflictException, Injectable, NotFoundException } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from'mongoose';
import { Place } from './entities/place.entity';

@Injectable()
export class PlacesService {
  constructor(
    @InjectModel('Place') private readonly placeModel: Model<Place>
  ) {}

  private async getPlace(id: string) {
    let place;
    try {
      place = await this.placeModel.findById(id).populate('reviews').exec();
    } catch(err) {
      throw new NotFoundException('Place not found');
    }
    if(!place) {
      throw new NotFoundException('Place not found');
    }

    return place as Place;
  }

  async create(name: string, center: number[], borders: any[]) {
    let newPlace,
        res;
    try {
      newPlace = new this.placeModel({
        name,
        center,
        borders
      });
      res = await newPlace.save();
    } catch(err) {
      throw new ConflictException('A place with that name already exists');
    }

    return res.id as string;
  }

  async findAll() {
    const places = await this.placeModel.find().populate('reviews').exec();

    return places;
  }

  async findOne(id: string) {
    const place = await this.getPlace(id);

    return place;
  }

  async update(id: string, name: string, center: number[], borders: any[]) {
    const place = await this.getPlace(id);
    if(name) {
      place.name = name;
    }
    if(center) {
      place.center = center;
    }
    if(borders) {
      place.borders = borders;
    }
    place.save();
  }

  async remove(id: string) {
    const res = await this.placeModel.deleteOne({_id: id}).exec();
    if(res.n === 0) {
      throw new NotFoundException('Place not found');
    }
  }

  async search(query: string) {
    const res = await this.placeModel.aggregate([
      {
        $search: {
          autocomplete: {
            path: 'name',
            query: query,
          },
        },
      },
      {
        $limit: 5,
      },
      {
        $project: {
          _id: 1,
          name: 1,
          center: 1,
          borders: 1
        },
      },
    ]);
    
    return res;
  }
}
If you’re familiar with magical or religious traditions, you may be able to decipher the