Allow to create sticker sets with suggested name for regular users.
This commit is contained in:
parent
facb3a43e5
commit
cf55275b7d
@ -10078,7 +10078,8 @@ checkStickerSetName name:string = CheckStickerSetNameResult;
|
|||||||
//@description Creates a new sticker set. Returns the newly created sticker set
|
//@description Creates a new sticker set. Returns the newly created sticker set
|
||||||
//@user_id Sticker set owner; ignored for regular users
|
//@user_id Sticker set owner; ignored for regular users
|
||||||
//@title Sticker set title; 1-64 characters
|
//@title Sticker set title; 1-64 characters
|
||||||
//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 0-64 characters.
|
||||||
|
//-If empty, then the name returned by getSuggestedStickerSetName will be used automatically
|
||||||
//@sticker_type Type of the stickers in the set
|
//@sticker_type Type of the stickers in the set
|
||||||
//@needs_repainting Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only
|
//@needs_repainting Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only
|
||||||
//@stickers List of stickers to be added to the set; must be non-empty. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
//@stickers List of stickers to be added to the set; must be non-empty. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
||||||
|
@ -7925,7 +7925,7 @@ void StickersManager::create_new_sticker_set(UserId user_id, string title, strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
short_name = strip_empty_characters(short_name, MAX_STICKER_SET_SHORT_NAME_LENGTH);
|
short_name = strip_empty_characters(short_name, MAX_STICKER_SET_SHORT_NAME_LENGTH);
|
||||||
if (short_name.empty()) {
|
if (short_name.empty() && is_bot) {
|
||||||
return promise.set_error(Status::Error(400, "Sticker set name must be non-empty"));
|
return promise.set_error(Status::Error(400, "Sticker set name must be non-empty"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user