From 8e882dda214c56d7cdcc8fde4a412e0db5163db0 Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Thu, 10 Dec 2020 21:04:09 +0800 Subject: [PATCH] [Fixes: #11074] only validate whether group name is blank Signed-off-by: Andrea Maria Piana --- src/status_im/group_chats/core.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/status_im/group_chats/core.cljs b/src/status_im/group_chats/core.cljs index 5b30d37450..9a9c4ebd5e 100644 --- a/src/status_im/group_chats/core.cljs +++ b/src/status_im/group_chats/core.cljs @@ -1,6 +1,7 @@ (ns status-im.group-chats.core (:refer-clojure :exclude [remove]) (:require [clojure.spec.alpha :as spec] + [clojure.string :as string] [re-frame.core :as re-frame] [status-im.chat.models :as models.chat] [status-im.chat.models.message :as models.message] @@ -120,8 +121,11 @@ nil) (navigation/navigate-to-cofx :home {}))) +(def not-blank? + (complement string/blank?)) + (defn- valid-name? [name] - (spec/valid? :profile/name name)) + (spec/valid? not-blank? name)) (fx/defn name-changed "Save chat from edited profile"