Merge commit '62d7423bc3f1925eb777e4f5e43de8c48ebf3191'
This commit is contained in:
commit
459e08c1b4
@ -216,7 +216,7 @@ namespace TdExample
|
||||
{
|
||||
// disable TDLib log
|
||||
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
||||
if (Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27))) is TdApi.Error)
|
||||
if (Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, false))) is TdApi.Error)
|
||||
{
|
||||
throw new System.IO.IOException("Write access to the current directory is required");
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ public final class Example {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// disable TDLib log
|
||||
Client.execute(new TdApi.SetLogVerbosityLevel(0));
|
||||
if (Client.execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27))) instanceof TdApi.Error) {
|
||||
if (Client.execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, false))) instanceof TdApi.Error) {
|
||||
throw new IOError(new IOException("Write access to the current directory is required"));
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace TdApp
|
||||
_handler = new MyClientResultHandler(this);
|
||||
|
||||
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
||||
Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile(Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "log"), 1 << 27)));
|
||||
Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile(Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "log"), 1 << 27, false)));
|
||||
|
||||
System.Threading.Tasks.Task.Run(() =>
|
||||
{
|
||||
|
@ -3698,7 +3698,7 @@ getChatMessageCount chat_id:int53 filter:SearchMessagesFilter return_local:Bool
|
||||
//@description Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier
|
||||
getChatScheduledMessages chat_id:int53 = Messages;
|
||||
|
||||
//@description Returns forwarded copies of a channel message to another public channels. For optimal performance the number of returned messages is chosen by the library
|
||||
//@description Returns forwarded copies of a channel message to another public channels. For optimal performance the number of returned messages is chosen by the library. The method is under development and may or may not work
|
||||
//@chat_id Chat identifier of the message
|
||||
//@message_id Message identifier
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results
|
||||
@ -4569,7 +4569,7 @@ getChatStatisticsUrl chat_id:int53 parameters:string is_dark:Bool = HttpUrl;
|
||||
//@description Returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.can_get_statistics == true @chat_id Chat identifier @is_dark Pass true if a dark theme is used by the application
|
||||
getChatStatistics chat_id:int53 is_dark:Bool = ChatStatistics;
|
||||
|
||||
//@description Returns detailed statistics about a message. Can be used only if Message.can_get_statistics == true @chat_id Chat identifier @message_id Message identifier @is_dark Pass true if a dark theme is used by the application
|
||||
//@description Returns detailed statistics about a message. Can be used only if Message.can_get_statistics == true. The method is under development and may or may not work @chat_id Chat identifier @message_id Message identifier @is_dark Pass true if a dark theme is used by the application
|
||||
getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatistics;
|
||||
|
||||
//@description Loads asynchronous or zoomed in chat or message statistics graph @chat_id Chat identifier @token The token for graph loading @x X-value for zoomed in graph or 0 otherwise
|
||||
|
@ -18868,15 +18868,11 @@ td_api::object_ptr<td_api::ChatActionBar> MessagesManager::get_chat_action_bar_o
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *d, int64 real_order) const {
|
||||
td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *d) const {
|
||||
CHECK(d != nullptr);
|
||||
|
||||
auto chat_source = is_dialog_sponsored(d) ? sponsored_dialog_source_.get_chat_source_object() : nullptr;
|
||||
|
||||
if (real_order == DEFAULT_ORDER) {
|
||||
real_order = d->order;
|
||||
}
|
||||
|
||||
bool can_delete_for_self = false;
|
||||
bool can_delete_for_all_users = false;
|
||||
if (chat_source != nullptr) {
|
||||
@ -18889,7 +18885,7 @@ td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *
|
||||
// can't delete
|
||||
break;
|
||||
}
|
||||
} else if (!td_->auth_manager_->is_bot() && real_order != DEFAULT_ORDER) {
|
||||
} else if (!td_->auth_manager_->is_bot() && have_input_peer(d->dialog_id, AccessRights::Read)) {
|
||||
switch (d->dialog_id.get_type()) {
|
||||
case DialogType::User:
|
||||
can_delete_for_self = true;
|
||||
@ -26911,10 +26907,10 @@ void MessagesManager::send_update_delete_messages(DialogId dialog_id, vector<int
|
||||
make_tl_object<td_api::updateDeleteMessages>(dialog_id.get(), std::move(message_ids), is_permanent, from_cache));
|
||||
}
|
||||
|
||||
void MessagesManager::send_update_new_chat(Dialog *d, int64 real_order) {
|
||||
void MessagesManager::send_update_new_chat(Dialog *d) {
|
||||
CHECK(d != nullptr);
|
||||
CHECK(d->messages == nullptr);
|
||||
auto chat_object = get_chat_object(d, real_order);
|
||||
auto chat_object = get_chat_object(d);
|
||||
bool has_action_bar = chat_object->action_bar_ != nullptr;
|
||||
d->last_sent_has_scheduled_messages = chat_object->has_scheduled_messages_;
|
||||
send_closure(G()->td(), &Td::send_update, make_tl_object<td_api::updateNewChat>(std::move(chat_object)));
|
||||
@ -32332,7 +32328,7 @@ MessagesManager::Dialog *MessagesManager::add_new_dialog(unique_ptr<Dialog> &&d,
|
||||
|
||||
fix_dialog_action_bar(dialog);
|
||||
|
||||
send_update_new_chat(dialog, order);
|
||||
send_update_new_chat(dialog);
|
||||
|
||||
fix_new_dialog(dialog, std::move(last_database_message), last_database_message_id, order, last_clear_history_date,
|
||||
last_clear_history_message_id, is_loaded_from_database);
|
||||
|
@ -2187,7 +2187,7 @@ class MessagesManager : public Actor {
|
||||
void send_update_delete_messages(DialogId dialog_id, vector<int64> &&message_ids, bool is_permanent,
|
||||
bool from_cache) const;
|
||||
|
||||
void send_update_new_chat(Dialog *d, int64 real_order);
|
||||
void send_update_new_chat(Dialog *d);
|
||||
|
||||
void send_update_chat_draft_message(const Dialog *d);
|
||||
|
||||
@ -2388,7 +2388,7 @@ class MessagesManager : public Actor {
|
||||
td_api::object_ptr<td_api::ChatActionBar> get_chat_action_bar_object(const Dialog *d,
|
||||
bool hide_unarchive = false) const;
|
||||
|
||||
td_api::object_ptr<td_api::chat> get_chat_object(const Dialog *d, int64 real_order = DEFAULT_ORDER) const;
|
||||
td_api::object_ptr<td_api::chat> get_chat_object(const Dialog *d) const;
|
||||
|
||||
bool have_dialog_info(DialogId dialog_id) const;
|
||||
bool have_dialog_info_force(DialogId dialog_id) const;
|
||||
|
Loading…
Reference in New Issue
Block a user