Remove useless PSLICE/PSTRING.
This commit is contained in:
parent
ebae9298a6
commit
9217e9090a
@ -98,7 +98,7 @@ FileSourceId FileReferenceManager::create_recent_stickers_file_source(bool is_at
|
||||
|
||||
FileSourceId FileReferenceManager::create_favorite_stickers_file_source() {
|
||||
FileSourceFavoriteStickers source;
|
||||
return add_file_source_id(source, PSLICE() << "favorite stickers");
|
||||
return add_file_source_id(source, "favorite stickers");
|
||||
}
|
||||
|
||||
FileSourceId FileReferenceManager::create_background_file_source(BackgroundId background_id, int64 access_hash) {
|
||||
|
@ -952,8 +952,8 @@ unique_ptr<LinkManager::InternalLink> LinkManager::parse_t_me_link_query(Slice q
|
||||
} else if (path[0][0] == ' ' || path[0][0] == '+') {
|
||||
if (path[0].size() >= 2) {
|
||||
// /+<link>
|
||||
return td::make_unique<InternalLinkDialogInvite>(
|
||||
PSTRING() << "tg:join?invite=" + url_encode(get_url_query_hash(false, url_query)));
|
||||
return td::make_unique<InternalLinkDialogInvite>(PSTRING() << "tg:join?invite="
|
||||
<< url_encode(get_url_query_hash(false, url_query)));
|
||||
}
|
||||
} else if (path[0] == "addstickers") {
|
||||
if (path.size() >= 2 && !path[1].empty()) {
|
||||
|
@ -230,15 +230,19 @@ class MessagesDbImpl final : public MessagesDbSyncInterface {
|
||||
"ORDER BY rowid DESC LIMIT ?3) ORDER BY search_id DESC"));
|
||||
|
||||
for (int32 i = 0; i < MESSAGES_DB_INDEX_COUNT; i++) {
|
||||
TRY_RESULT_ASSIGN(get_messages_from_index_stmts_[i].desc_stmt_,
|
||||
db_.get_statement(PSLICE() << "SELECT data, message_id FROM messages WHERE dialog_id = ?1 "
|
||||
"AND message_id < ?2 AND (index_mask & "
|
||||
<< (1 << i) << ") != 0 ORDER BY message_id DESC LIMIT ?3"));
|
||||
TRY_RESULT_ASSIGN(
|
||||
get_messages_from_index_stmts_[i].desc_stmt_,
|
||||
db_.get_statement(
|
||||
PSLICE()
|
||||
<< "SELECT data, message_id FROM messages WHERE dialog_id = ?1 AND message_id < ?2 AND (index_mask & "
|
||||
<< (1 << i) << ") != 0 ORDER BY message_id DESC LIMIT ?3"));
|
||||
|
||||
TRY_RESULT_ASSIGN(get_messages_from_index_stmts_[i].asc_stmt_,
|
||||
db_.get_statement(PSLICE() << "SELECT data, message_id FROM messages WHERE dialog_id = ?1 "
|
||||
"AND message_id > ?2 AND (index_mask & "
|
||||
<< (1 << i) << ") != 0 ORDER BY message_id ASC LIMIT ?3"));
|
||||
TRY_RESULT_ASSIGN(
|
||||
get_messages_from_index_stmts_[i].asc_stmt_,
|
||||
db_.get_statement(
|
||||
PSLICE()
|
||||
<< "SELECT data, message_id FROM messages WHERE dialog_id = ?1 AND message_id > ?2 AND (index_mask & "
|
||||
<< (1 << i) << ") != 0 ORDER BY message_id ASC LIMIT ?3"));
|
||||
|
||||
// LOG(ERROR) << get_messages_from_index_stmts_[i].desc_stmt_.explain().ok();
|
||||
// LOG(ERROR) << get_messages_from_index_stmts_[i].asc_stmt_.explain().ok();
|
||||
|
@ -858,7 +858,7 @@ Status SecretChatActor::do_inbound_message_encrypted(unique_ptr<log_event::Inbou
|
||||
send_update_secret_chat();
|
||||
}
|
||||
if (layer >= static_cast<int32>(SecretChatLayer::Mtproto2) && mtproto_version < 2) {
|
||||
return Status::Error(PSLICE() << "MTProto 1.0 encryption is forbidden for this layer");
|
||||
return Status::Error("MTProto 1.0 encryption is forbidden for this layer");
|
||||
}
|
||||
if (message_with_layer->in_seq_no_ < 0) {
|
||||
return Status::Error(PSLICE() << "Invalid seq_no: " << to_string(message_with_layer));
|
||||
|
Loading…
Reference in New Issue
Block a user