Fix the way conversations are created

This commit is contained in:
Pierre HUBERT 2021-03-09 18:59:15 +01:00
parent 339315395d
commit ff499f9892
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ const ConversationsInterface = {
//Prepare an API request //Prepare an API request
var apiURI = "conversations/create"; var apiURI = "conversations/create";
var params = { var params = {
name: infos.conversationName, name: infos.conversationName == null ? "" : infos.conversationName,
follow : infos.follow, follow : infos.follow,
users: infos.users, users: infos.users,
color: infos.color == null ? "" : infos.color.replace("#", "").toUpperCase(), color: infos.color == null ? "" : infos.color.replace("#", "").toUpperCase(),

View File

@ -123,7 +123,7 @@ const ConversationsList = {
var conversationInformations = { var conversationInformations = {
users: selectedUsers, users: selectedUsers,
follow: infos.followConversationInput.checked, follow: infos.followConversationInput.checked,
conversationName: (infos.conversationNameInput.value == "" ? false : infos.conversationNameInput.value), conversationName: (infos.conversationNameInput.value == "" ? null : infos.conversationNameInput.value),
color: infos.conversationColorInput.value == "" ? null : infos.conversationColorInput.value, color: infos.conversationColorInput.value == "" ? null : infos.conversationColorInput.value,
allowEveryoneToAddMembersInput: infos.allowEveryoneToAddMembersInput.checked, allowEveryoneToAddMembersInput: infos.allowEveryoneToAddMembersInput.checked,
}; };