Skip to content

Commit

Permalink
Merge branch 'master' of ssh.git.ignuranza.net:tdlight-team/tdlight
Browse files Browse the repository at this point in the history
  • Loading branch information
cavallium committed Nov 6, 2020
2 parents 8c8b105 + e022963 commit d71e2c5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,15 @@
}

var low_memory = false;
if (os_linux || os_freebsd || os_openbsd || os_netbsd) {
if (os_linux || os_freebsd || os_netbsd) {
low_memory = document.getElementById('buildLowMemoryCheckbox').checked;
document.getElementById('buildLowMemoryText').innerHTML = 'I have less than ' + (use_clang ? '1.5' : '3.5') +' GB of RAM.' +
(low_memory ? ' Now you will need only ' + (use_clang ? '0.5' : '1') +' GB of RAM to build TDLib.' : '');
document.getElementById('buildLowMemoryDiv').style.display = 'block';
} else {
if (os_openbsd) {
low_memory = true;
}
document.getElementById('buildLowMemoryDiv').style.display = 'none';
}

Expand Down
6 changes: 6 additions & 0 deletions td/telegram/MessageContentType.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ bool is_service_message_content(MessageContentType content_type);

bool can_have_message_content_caption(MessageContentType content_type);

struct MessageContentTypeHash {
std::size_t operator()(MessageContentType content_type) const {
return std::hash<int32>()(static_cast<int32>(content_type));
}
};

} // namespace td
4 changes: 2 additions & 2 deletions td/telegram/MessagesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ class SearchMessagesQuery : public Td::ResultHandler {
send_query(G()->net_query_creator().create(
telegram_api::messages_getUnreadMentions(std::move(input_peer), from_message_id.get_server_message_id().get(),
offset, limit, std::numeric_limits<int32>::max(), 0)));
} else if (top_thread_message_id.is_valid() && !sender_dialog_id.is_valid() &&
} else if (top_thread_message_id.is_valid() && query.empty() && !sender_dialog_id.is_valid() &&
filter == MessageSearchFilter::Empty) {
handle_errors_ = dialog_id.get_type() != DialogType::Channel ||
td->contacts_manager_->get_channel_type(dialog_id.get_channel_id()) != ChannelType::Broadcast;
Expand Down Expand Up @@ -23227,7 +23227,7 @@ Result<vector<MessageId>> MessagesManager::send_message_group(
TRY_RESULT(message_send_options, process_message_send_options(dialog_id, std::move(options)));

vector<std::pair<unique_ptr<MessageContent>, int32>> message_contents;
std::unordered_set<MessageContentType> message_content_types;
std::unordered_set<MessageContentType, MessageContentTypeHash> message_content_types;
for (auto &input_message_content : input_message_contents) {
TRY_RESULT(message_content, process_input_message_content(dialog_id, std::move(input_message_content)));
TRY_STATUS(can_use_message_send_options(message_send_options, message_content));
Expand Down
2 changes: 1 addition & 1 deletion tdutils/test/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
using namespace td;

struct CheckExitGuard {
explicit CheckExitGuard(bool expected_value): expected_value_(expected_value) {
explicit CheckExitGuard(bool expected_value) : expected_value_(expected_value) {
}
CheckExitGuard(CheckExitGuard &&) = delete;
CheckExitGuard &operator=(CheckExitGuard &&) = delete;
Expand Down

0 comments on commit d71e2c5

Please sign in to comment.