Commit Graph

979 Commits

Author SHA1 Message Date
levlam
0594b9e795 Do not send chat actions to bots, deleted users and users with hidden online status.
GitOrigin-RevId: 8bd7c272b34ae6d977e58e89f0e76a158f02f150
2019-12-18 18:57:21 +03:00
levlam
2b94d84a2f Notify server about viewed live locations once a minute.
GitOrigin-RevId: 4658a8807f9acc8820c73fa64a348c86e83dadd2
2019-12-16 18:39:40 +03:00
levlam
ca519dcc81 Notify server when live location is viewed.
GitOrigin-RevId: 526201f4539504800fab4552ff59d7e7a7b83fe2
2019-12-16 04:07:14 +03:00
levlam
2c47242374 Check validness of peer_user_id in secret chats.
GitOrigin-RevId: 299ad87085b8c7b1a1f0de15012e54dfdb2c4d6c
2019-12-16 01:58:57 +03:00
levlam
fc130aec51 Skip action bar repair on close.
GitOrigin-RevId: 3fa1fdc3d0664a2fb6d80f1010b2a5c20382253c
2019-12-15 23:38:32 +03:00
levlam
d4a701f48a Add force_create_dialog debug.
GitOrigin-RevId: 31c3d381ea276519a8c93732ad88c6e99ffec295
2019-12-15 23:33:58 +03:00
levlam
cf1902c04a Fix Message::parse.
GitOrigin-RevId: 7366e38479801b4e16eccd9756dd072027fcc0b0
2019-12-15 22:35:30 +03:00
levlam
fa04e668f6 Better support for GEO_LIVE_PENDING push notifications.
GitOrigin-RevId: 7fb392ec0e6471a09a3b325db48531700204c039
2019-12-14 01:57:17 +03:00
levlam
1dd4e1a767 Add td_api::updateMessageLiveLocationViewed.
GitOrigin-RevId: 2c9d6e1317e6604a23e30efab0dfa21a2e88f01d
2019-12-13 21:05:10 +03:00
levlam
3ec96b4c30 Remove channels from inactive channels list on new message or after leave.
GitOrigin-RevId: 8c9723ed489a714df0b70abe465c04eba1265b0e
2019-12-13 17:57:00 +03:00
levlam
4e223096da Treat forwarded and via bot messages as copied.
GitOrigin-RevId: e3fcd5caea9a08c0a941f549a33356cd9b6075ce
2019-12-13 01:18:07 +03:00
levlam
be30ac854a Use default sequence dispatcher for copied messages.
GitOrigin-RevId: 08058ff0492d0a0c6b432d00b8061b78d7849e94
2019-12-13 00:46:38 +03:00
levlam
14f1b3cd4b Always ignore updateReadHistoryInbox.still_unread_count, because it can be wrong even in updates.
GitOrigin-RevId: ff2222911c995605d813a942ccf833b7e7d620bb
2019-12-06 22:49:07 +03:00
levlam
b13096e8a9 Fix adding to database of rescheduled messages.
GitOrigin-RevId: fe07906bdc9ef264d9d40e225dbc8fbb7d547acd
2019-12-06 21:46:57 +03:00
levlam
7b97e98164 Bug fixes.
GitOrigin-RevId: f2575e76da10f0071587504913d8c87acaf91133
2019-12-06 21:21:51 +03:00
levlam
2c030f1bed Fix rescheduling of being edited message.
GitOrigin-RevId: f398f11ac37fbec9edbcbf8b470620f7d43db29d
2019-12-06 20:47:22 +03:00
levlam
bdc8c27bc4 More improvements.
GitOrigin-RevId: 627bf44586c26bc1e4817e42b611a1e470e44ee7
2019-12-06 20:31:34 +03:00
levlam
60c0c3a637 Use actual message_id.
GitOrigin-RevId: e1e62511c4752ad3c1339f694a6937a8d7075bee
2019-12-06 16:26:26 +03:00
levlam
d6ce1dfbc4 Rename have_message to have_message_force.
GitOrigin-RevId: 7ad820c8d73a5bcae4b30ccf2b1e3ba722047878
2019-12-06 05:02:02 +03:00
levlam
2baa52f975 Use exact ID of deleted message in updateDeleteMessages.
GitOrigin-RevId: cbed7d24434e07f5925044fdb65152f9e4809737
2019-12-06 04:56:27 +03:00
levlam
439ff9be0b Do not allow to send scheduled live location and self-destructing messages.
GitOrigin-RevId: 17a93e32f995f67cc164ca7636c8a2025376525c
2019-12-06 04:25:44 +03:00
levlam
211ab071b2 Add MessageSchedulingState to sendMessageOptions.
GitOrigin-RevId: a2a7d6e3c9283b645b0a155f96c8165a7a717b8d
2019-12-06 03:08:11 +03:00
levlam
a3301ae07c Introduce common SendMessageOptions for send message requests.
GitOrigin-RevId: 3cef644b80ec3641a9f15de7a5af13f90a9c7d94
2019-12-06 02:32:23 +03:00
levlam
797a117b60 Disable quick ack if reused media is sent.
GitOrigin-RevId: 4e1166d9fd2faf103c3f59775565fc510906d02d
2019-12-06 00:39:39 +03:00
levlam
6520bdea85 Scheduled messages bug fixes.
GitOrigin-RevId: e27dd1ab21e2b43f794bbae75a3c2d62016714c8
2019-12-06 00:31:28 +03:00
levlam
8bee3c715f Support sending scheduled messages.
GitOrigin-RevId: 64d8e451182313ba95e5af0ae4f9af9f08330475
2019-12-05 20:34:19 +03:00
levlam
c01d0a89e6 Add set_message_id function.
GitOrigin-RevId: 0b8c03b6f26cfae0e388edd387a1d60576fe738d
2019-12-05 16:29:06 +03:00
levlam
f0cbbb49c8 Do not automatically read content of scheduled messages.
GitOrigin-RevId: a48b63b7645775f6a97abfd76326e830ebbf911e
2019-12-05 01:05:10 +03:00
levlam
11f313c283 Repair scheduled messages when has_scheduled_server_messages changes.
GitOrigin-RevId: 916d603b7b0715cf95ac07b900b820ff17fa1b6d
2019-12-05 00:58:59 +03:00
levlam
28f0cd5df5 Synchronize scheduled messages with the server.
GitOrigin-RevId: e4934cf80b6fd769891a684f01ff7d76eeae9cf9
2019-12-05 00:24:48 +03:00
levlam
f098a71926 Add persisitent has_scheduled_database_messages. Now Message.has_scheduled_messages should be always correct.
GitOrigin-RevId: 8fd4e1feceeae1f96599250410745069ff42b3a1
2019-12-04 22:43:14 +03:00
levlam
6b6d9e509b Add limit to get_scheduled_messages.
GitOrigin-RevId: e49616784f920b526611ac44dd7c5c5d7b599318
2019-12-04 21:52:53 +03:00
levlam
4b3c36e924 Send updateChatHasScheduledMessages whenever a scheduled message is added or deleted.
GitOrigin-RevId: df1f6b90fa611f89c6b0c95131c33a6cd446807b
2019-12-04 21:44:40 +03:00
levlam
8b0be018b8 Add send_update_chat_has_scheduled_messages function.
GitOrigin-RevId: 40f93886362b53651c0eb5eb77b3847bc127bd83
2019-12-04 21:01:00 +03:00
levlam
bf0bc88e19 Better name for has_scheduled_messages.
GitOrigin-RevId: 8563f78409e3142baa21ac70f6c5bdeb1728c274
2019-12-04 20:51:52 +03:00
levlam
7bd137889b Calculate scheduled messages hash.
GitOrigin-RevId: 2d3fc1e9d4e19913993ddf0d6aaee4303d2b41bc
2019-12-04 20:41:49 +03:00
levlam
a99c3ba264 Store and check separately deleted_scheduled_server_message_ids.
GitOrigin-RevId: 45eba775a6d80cb74a62616ff63a9dc1f6fa3ebd
2019-12-04 20:32:50 +03:00
levlam
b9666b727e Add td_api::getChatScheduledMessages. Load scheduled messages from database.
GitOrigin-RevId: ab2554642ff588c227c40d4fa12ecc663608e7a4
2019-12-04 20:06:39 +03:00
levlam
b191c0e3f9 Support editing of scheduled messages.
GitOrigin-RevId: 5c288fcd12e06d13520b7baeb0aeec5acd01da38
2019-12-03 20:26:09 +03:00
levlam
fc8f1a9230 Support immediate send of scheduled messages.
GitOrigin-RevId: 84907f350f545dfd0f93129fd61c07692b5906cb
2019-12-03 16:16:19 +03:00
levlam
f5027bf97f Add td_api::editMessageSchedulingState.
GitOrigin-RevId: 193c66fa63e84a8a233a3d60f0593df591d9f80d
2019-12-03 04:36:23 +03:00
levlam
256ab1c2f7 Add MessagesManager::get_message_sending_state_object function.
GitOrigin-RevId: 36300a157d085f96afe9dd62b865b952ba38d042
2019-12-03 03:20:38 +03:00
levlam
aa01368b38 Add Message.scheduling_state.
GitOrigin-RevId: fd950850b1258f49f8272e99a0b4975ab11a38d6
2019-12-03 03:12:41 +03:00
levlam
ff1b4566f0 Decrease total_count when get invalid recent location.
GitOrigin-RevId: 26bd0b3be1211fb2a9cad34034c54d68764b6f56
2019-12-03 00:44:13 +03:00
levlam
f3dfaa6c29 Support scheduled message in MessageId::get_next_message_id. Add get_next_yet_unsent_scheduled_message_id.
GitOrigin-RevId: dfe0c0b13c6312525564eba9f10f390f5ad09778
2019-12-02 23:29:08 +03:00
levlam
57eb92060b Fixes for scheduled messages.
GitOrigin-RevId: 23bc0e408567366d21ba2f0f7be80983b6d92a15
2019-12-02 20:50:10 +03:00
levlam
f34a515e70 Support updateNewScheduledMessage.
GitOrigin-RevId: 09e706ddb7eab36e139bc6619a92272dcaef1fa4
2019-12-02 19:30:35 +03:00
levlam
bfd3d653a7 Support updateDeleteScheduledMessages.
GitOrigin-RevId: 9f2d0cf00a3e6ffe20c1b0834cad69fbb0861ad7
2019-12-02 19:20:54 +03:00
levlam
80d814e2ee Support rescheduling in add_scheduled_message_to_dialog.
GitOrigin-RevId: 0e914bcf3d06f1b1df6f4f7858086c41216e529c
2019-12-02 18:22:05 +03:00
levlam
995e8895ba Transparent return of a correct scheduled server message.
GitOrigin-RevId: c260cefdcef0a919f6aeb4a025500cfc3cd5af00
2019-12-02 17:56:03 +03:00
levlam
16f29863cd Support scheduled messages in MessagesDb::get_message.
GitOrigin-RevId: 77f428b6b0012a41b2766b98ccf076d18b5eb513
2019-12-02 17:27:28 +03:00
levlam
1a0bb5f56f Add scheduled messages database table.
GitOrigin-RevId: 6007af6d26f1c4577fd3e5f1613e5f89d1610fdc
2019-12-02 03:33:35 +03:00
levlam
b13213f9cb Add is_scheduled parameter to on_get_messages.
GitOrigin-RevId: 534179758c55494fce0005d8aceaa74a2c3d7247
2019-12-02 00:11:15 +03:00
levlam
9b7d248518 Store scheduled message date by their server message ID.
GitOrigin-RevId: de3ea20ea659ce9cf620e7223375937c494699a1
2019-12-01 20:50:52 +03:00
levlam
039db3374a Add GetScheduledMessagesQuery.
GitOrigin-RevId: f2881fcd10378fee44b0cfce060c25b18ed86541
2019-12-01 19:36:03 +03:00
levlam
f7cf15b9f2 Add strongly typed ScheduledServerMessageId.
GitOrigin-RevId: 222322bbf861c773b777c3b9beac3bf0dba561db
2019-12-01 19:03:51 +03:00
levlam
fb43213362 Add DeleteScheduledMessagesQuery.
GitOrigin-RevId: 958627be18ef34e89e2845d5e4fd095dbd4a66c4
2019-11-30 22:13:41 +03:00
levlam
af04f95daa Add separate reget_message_from_server_if_needed function.
GitOrigin-RevId: 18b0a4f38ac429890832851370ff6371f6496ff1
2019-11-30 20:22:44 +03:00
levlam
7ea11b2150 Add separate update_sent_message_contents function.
GitOrigin-RevId: 621fd837d722355a6e5a392b3de390f6bc0839ba
2019-11-30 20:04:49 +03:00
levlam
10c743a839 Add separate speculatively_update_channel_participants function.
GitOrigin-RevId: 73cb67adffb5488686e181d460640e0682e418e3
2019-11-30 19:41:23 +03:00
levlam
0c2c587f8c Add update_top_dialogs function.
GitOrigin-RevId: c5ea2e50e47693d37cb9e2d7dfea6176a2afed43
2019-11-30 19:29:52 +03:00
levlam
a75e53cdf3 Simplify update_used_hashtags usage.
GitOrigin-RevId: 998789ff1c53eaaac86a61728449ac6524e43326
2019-11-30 18:27:08 +03:00
levlam
8d8c3cacd4 Add change_message_files function.
GitOrigin-RevId: 3b6faf4c55cb11281ef98afc32534fb221716c1b
2019-11-30 18:17:34 +03:00
levlam
415229bfa6 Pass only dialog_id to need_delete_message_files.
GitOrigin-RevId: e5396f6bcaea435dca161d0cd47addfca42bfb79
2019-11-30 18:05:30 +03:00
levlam
a69c9a0f06 Simplify update_message usage.
GitOrigin-RevId: e4266a80dc4108053d293b5779fdf04d4988116d
2019-11-30 17:38:46 +03:00
levlam
fc6f1fc5f4 Add comment on calling set_dialog_reply_markup in on_get_message instead of add_message_to_dialog.
GitOrigin-RevId: e932db6bc5078baed759a6c7af6b2c72749db25a
2019-11-30 17:15:46 +03:00
levlam
40d13deeaa Store scheduled messages in a separate treap.
GitOrigin-RevId: dc56897b3faa45e5092d036bbb73f357a6e4c607
2019-11-30 17:04:59 +03:00
levlam
1d9c00e9f4 Use MultiPromise in get_messages_from_server.
GitOrigin-RevId: e257dc31983b987cac0248d1a8dcf4b3cb2bd506
2019-11-30 15:50:27 +03:00
levlam
b78507e81d Use MultiPromise to delete messages from server.
GitOrigin-RevId: 8fa8b27bfb4d3d394016e8b4fd18ea56294dae7a
2019-11-30 15:45:31 +03:00
levlam
d9160fd52c Add treap_delete_message static function.
GitOrigin-RevId: 36433ee3bd262a791a916ee6b0f3207346894193
2019-11-29 20:30:55 +03:00
levlam
fdc81d6d9b Improve spelling.
GitOrigin-RevId: c52f49b8637f641b0781f0af640c8e03a4fed121
2019-11-29 19:24:45 +03:00
levlam
3b1ab2ff8f Add scheduled-safe MessageId comparison operators.
GitOrigin-RevId: edc6481519510a425bcf3f08bb46eaac1c923ee4
2019-11-29 19:11:06 +03:00
levlam
0c77eb2745 Pass raw pointers in find_*.
GitOrigin-RevId: 1f62c94647d861e2ff828c64391badd76c8e1ec9
2019-11-29 16:16:02 +03:00
levlam
c710403382 Move cancel_send_deleted_message call to on_message_deleted.
GitOrigin-RevId: 84a141e575f8a1b87508c208fe5f1649ab0900df
2019-11-29 15:57:03 +03:00
levlam
1a636768b9 Add cancel_send_deleted_message function.
GitOrigin-RevId: 64f33bc1540da85a4c2c81ca28d8f4e1849dd9fb
2019-11-29 15:52:18 +03:00
levlam
c65004efde Padd Message pointer to cancel_send_message_query.
GitOrigin-RevId: 2e56372571b970d8549f5a8b9223218f1ffa9244
2019-11-29 15:30:48 +03:00
levlam
9948e41aed Add support for scheduled message IDs in MessagesManager.
GitOrigin-RevId: b489f50556450a142427159a80d6488bf36622d1
2019-11-29 15:03:03 +03:00
levlam
6b24886bf0 Partial support for scheduled message IDs.
GitOrigin-RevId: 752336efc26fb73a038801b99b490d0f68163b04
2019-11-26 23:47:13 +03:00
levlam
0618005a95 Add FullMessageId.h.
GitOrigin-RevId: 758133149ff3317b3d9d3f86b1a841e8f34ca35a
2019-11-26 19:53:10 +03:00
levlam
9da6ecaf1f Make MessageId layout private.
GitOrigin-RevId: a123b1bd7fe02110e699878c6c60dcc41b90c960
2019-11-26 03:32:05 +03:00
levlam
b4e45a2852 Make MessageId::SERVER_ID_SHIFT private.
GitOrigin-RevId: c7fa31a1fda75d874c674f0ee8e9ddcebde21c9d
2019-11-26 03:07:45 +03:00
levlam
5b1d363918 Add Chat.has_scheduled_messages flag.
GitOrigin-RevId: 6d7f211647c738d5912476232e8842c245d1f884
2019-11-25 19:11:24 +03:00
levlam
2a335089f9 Save is_from_scheduled Message flag.
GitOrigin-RevId: 6db9c1a244f275372fddd74977fdce37e8ffad35
2019-11-25 03:36:49 +03:00
levlam
df2b273aea Add td_api::message.restriction_reason.
GitOrigin-RevId: 9ecf89e3f14ed64d6ce5bd33aed97e03feae794a
2019-11-24 02:28:48 +03:00
levlam
b00293992e Fix hide_edit_date support.
GitOrigin-RevId: a6875a31b618f527883e8bc205efe8ac96f683b9
2019-11-22 14:02:18 +03:00
levlam
8b0f0cdaf6 Add support for hiding message edit date via server-side flag.
GitOrigin-RevId: 675035e0b7d087da9ec76c2e104fb8ba23f07c18
2019-11-22 00:02:09 +03:00
levlam
c5cc0e90f6 Update layer ro 106.
GitOrigin-RevId: 41e5db3d090559a7403accc8057c9957e6ead02d
2019-11-21 22:57:20 +03:00
levlam
0f353009f8 Improve slow mode.
GitOrigin-RevId: 068774033f5c84165e4833dafa29789d307ab97b
2019-11-21 16:58:00 +03:00
levlam
97cdacff7b Update slow_mode_next_send_date when a message is sent.
GitOrigin-RevId: d373e4685a4c6b717272844b50da8fb3139b2f64
2019-11-21 02:41:53 +03:00
levlam
38696df14d Load all drafts when chat list is loaded first time.
GitOrigin-RevId: 5f9190a53ecb131f3493dfd0bf53c04c3bf9fe8f
2019-11-17 22:27:52 +03:00
levlam
43d8e6ccdb Return administrator ranks from getChatAdministrators.
GitOrigin-RevId: 8e3e540ae73aebacf9a3fe954b2b81511c999953
2019-11-11 19:14:32 +03:00
levlam
ad051b5522 Add td_api::chatEventSlowModeDelayChanged.
GitOrigin-RevId: ac41d0d684b422ed964c6d35af160992b988b2ce
2019-11-10 17:26:03 +03:00
levlam
6714476496 Improve logging.
GitOrigin-RevId: 932e48adddac8a163ed114e610fdee1a1d614700
2019-10-26 16:39:23 +03:00
levlam
1e018da7b8 Various fixes.
GitOrigin-RevId: b09e5fda6d25bd027f6bcbcbbe8324567b8ddcf8
2019-10-22 20:01:15 +03:00
levlam
ca35608868 Add chat_list filter to searchMessages.
GitOrigin-RevId: 3dbc4b3509545f3c23f0231c931af0a73bef8796
2019-10-22 15:06:11 +03:00
levlam
918f6a0cfd Use td::contains and td::remove instead of std::find if possible.
GitOrigin-RevId: faa0863eb49ee8ce4c2138dfec022620f71d2f6a
2019-10-22 02:12:58 +03:00
levlam
56c3a2fbed Use td::remove_if.
GitOrigin-RevId: 5cf21381966dc58689a06cc94cb8843fd8087bb9
2019-10-21 16:25:56 +03:00
levlam
4ae36f6564 Keep privacy exception flag when hiding action bar and reporting spam.
GitOrigin-RevId: 64c21e3ca52bf74b19b7ee40bee6c9218a6feb70
2019-10-17 20:55:55 +03:00
levlam
4e9ca731b2 Allow to create location-based chats through createNewSupergroupChat.
GitOrigin-RevId: 9f954674052a2710425555e9b517f06319eb949e
2019-10-14 17:51:12 +03:00
levlam
af527d0c9e Support supergroups with location.
GitOrigin-RevId: 976b72eaf8d5fd2226b6d548ed8bca167b385264
2019-10-13 20:58:32 +03:00