Allow to create basic groups without other members.

This commit is contained in:
levlam 2023-02-24 16:33:14 +03:00
parent 1543c41f34
commit 3979fc122b
2 changed files with 1 additions and 6 deletions

View File

@ -6623,7 +6623,7 @@ createSupergroupChat supergroup_id:int53 force:Bool = Chat;
createSecretChat secret_chat_id:int32 = Chat;
//@description Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat
//@user_ids Identifiers of users to be added to the basic group
//@user_ids Identifiers of users to be added to the basic group; may be empty to create a basic group without other members
//@title Title of the new basic group; 1-128 characters
//@message_auto_delete_time Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically
createNewBasicGroupChat user_ids:vector<int53> title:string message_auto_delete_time:int32 = Chat;

View File

@ -21340,11 +21340,6 @@ DialogId MessagesManager::create_new_group_chat(const vector<UserId> &user_ids,
return dialog_id;
}
if (user_ids.empty()) {
promise.set_error(Status::Error(400, "Too few users to create basic group chat"));
return DialogId();
}
auto new_title = clean_name(title, MAX_TITLE_LENGTH);
if (new_title.empty()) {
promise.set_error(Status::Error(400, "Title must be non-empty"));