Allow to create basic groups without other members.
This commit is contained in:
parent
1543c41f34
commit
3979fc122b
@ -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;
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user