Backendde halletmen lazım. Şöyle bir pseudo kod yazacaksın.

if uzunluk(mesaj) == 0 {
return boş mesaj almıyoruz;
}