Add operators contains and starts_with to sticker find

This commit is contained in:
jcorporation
2024-04-06 20:08:59 +02:00
parent 4c56e87e36
commit c613d25f29
5 changed files with 43 additions and 1 deletions

View File

@@ -439,6 +439,10 @@ handle_sticker(Client &client, Request args, Response &r)
op = StickerOperator::LESS_THAN_INT;
else if (StringIsEqual(op_s, "gt"))
op = StickerOperator::GREATER_THAN_INT;
else if (StringIsEqual(op_s, "contains"))
op = StickerOperator::CONTAINS;
else if (StringIsEqual(op_s, "starts_with"))
op = StickerOperator::STARTS_WITH;
else {
r.FmtError(ACK_ERROR_ARG, "bad operator \"{}\"", op_s);
return CommandResult::ERROR;