Minor improvements.

This commit is contained in:
levlam 2023-03-09 18:54:59 +03:00
parent 8fd2a69378
commit 79ea507664
3 changed files with 4 additions and 3 deletions

View File

@ -6839,7 +6839,7 @@ td::Result<td_api::object_ptr<td_api::inputSticker>> Client::get_input_sticker(c
TRY_RESULT(sticker, get_json_object_string_field(object, "sticker"));
auto input_file = get_input_file(query, td::Slice(), sticker, false);
if (input_file == nullptr) {
return td::Status::Error("sticker not found");
return td::Status::Error(400, "sticker not found");
}
TRY_RESULT(emoji_list, get_json_object_field(object, "emoji_list", td::JsonValue::Type::Array, false));
TRY_RESULT(emojis, get_sticker_emojis(std::move(emoji_list)));

View File

@ -12,6 +12,7 @@
#include "td/actor/actor.h"
#include "td/utils/BufferedFd.h"
#include "td/utils/common.h"
#include "td/utils/FloodControlFast.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
@ -47,7 +48,7 @@ class HttpServer final : public td::TcpListener::Callback {
return;
}
flood_control_.add_event(now);
LOG(INFO) << "Create tcp listener " << td::tag("address", ip_address_) << td::tag("port", port_);
LOG(INFO) << "Create TCP listener " << td::tag("address", ip_address_) << td::tag("port", port_);
listener_ = td::create_actor<td::TcpListener>(
PSLICE() << "TcpListener" << td::tag("address", ip_address_) << td::tag("port", port_), port_,
actor_shared(this, 1), ip_address_);

View File

@ -399,7 +399,7 @@ void WebhookActor::load_updates() {
CHECK(update.id.is_valid());
auto &dest_ptr = update_map_[update.id];
if (dest_ptr != nullptr) {
LOG(ERROR) << "Receive duplicated event " << update.id << " from TQueue";
LOG(ERROR) << "Receive duplicate event " << update.id << " from TQueue";
continue;
}
dest_ptr = td::make_unique<Update>();