Commit Graph

9015 Commits

Author SHA1 Message Date
levlam
99279ef13a Simplify story identifiers updating for users. 2023-08-11 13:12:46 +03:00
levlam
5b6e1c60db Minor improvements. 2023-08-09 13:31:34 +03:00
levlam
ce679e7b78 Move default reaction handling to ReactionManager. 2023-08-09 13:19:54 +03:00
levlam
441482c0c4 Remove now unneeded proxies to ReactionManager. 2023-08-09 13:10:06 +03:00
levlam
9dcfd9d66d Add ReactionManager and move there all reaction-related methods from StickersManager. 2023-08-09 12:59:48 +03:00
levlam
d2add02ac9 Move get_sorted_available_reactions to StickersManager. 2023-08-09 12:07:13 +03:00
levlam
eaa77f76e5 Fix misprint. 2023-08-08 02:34:33 +03:00
levlam
a7f8ff6eef Fix Java interface with SplitSource. 2023-08-07 01:47:43 +03:00
levlam
ac74ecaad5 Improve lower bound for story_list.server_total_count_. 2023-08-07 01:12:48 +03:00
levlam
9c3ce17c2f Decrease story_list.server_total_count when deleting chat active stories. 2023-08-07 01:07:55 +03:00
levlam
dc4114e235 Decrease server_total_count when load expired active stories from database. 2023-08-07 00:02:30 +03:00
levlam
672957a741 Fix sending of updateStoryListChatCount when full story list is loaded. 2023-08-06 23:38:55 +03:00
levlam
dabefc83fa Fix use_sqlite_pmc check. 2023-08-06 14:37:51 +03:00
levlam
ced8764663 Move binlog handling to slow net scheduler if there is no SQLite database. 2023-08-06 14:29:43 +03:00
levlam
39103e07db Add ChatReactions.hpp. 2023-08-06 02:32:09 +03:00
levlam
3fa863e98e Fix misprint. 2023-08-06 01:57:08 +03:00
levlam
28961b7d0e Add more common.h includes. 2023-08-05 16:09:36 +03:00
levlam
830da27abf Minor improvements. 2023-08-05 15:31:42 +03:00
levlam
57b935f6a7 Move more functions to ReactionType. 2023-08-05 14:59:42 +03:00
levlam
905287f1ec Improve ReactionType logging. 2023-08-04 18:44:54 +03:00
levlam
5558825d61 Add class ReactionType. 2023-08-04 18:39:07 +03:00
levlam
e695289557 Process updateReadStories for owned stories. 2023-08-04 14:33:42 +03:00
levlam
50a0c551cd Remove duplicate check. 2023-08-03 15:06:44 +03:00
levlam
8e1a7dbac2 Improve documentation. 2023-08-03 15:03:03 +03:00
levlam
ff687167f8 Improve edit story logging. 2023-08-02 12:43:46 +03:00
levlam
fbec238210 Mark "restriction_add_platforms" option as internal. 2023-08-02 12:37:23 +03:00
levlam
7f556e4b9d tg_cli: add class ReportReason. 2023-08-01 20:44:24 +03:00
levlam
a7b6f55d7a Add and use JsonObject::foreach. 2023-07-31 19:38:53 +03:00
levlam
d19b659337 Simplify JSON object processing in NotificationManager. 2023-07-31 19:16:24 +03:00
levlam
a1c726d895 Fix formatting. 2023-07-31 18:29:15 +03:00
levlam
3303c659bf Use JsonOnject::extract_ if possible. 2023-07-31 18:27:10 +03:00
levlam
7a80136478 Use JsonObject::has_field. 2023-07-31 17:53:17 +03:00
levlam
58f15df705 Use JsonObject::get_.*_field if possible. 2023-07-31 17:17:52 +03:00
levlam
88f169b714 Use get_json_object_field_force to extract @extra. 2023-07-31 14:12:01 +03:00
levlam
43941c1e69 Add JsonObject::field_count. 2023-07-31 13:33:35 +03:00
levlam
59044294a8 Make JsonObject class. 2023-07-31 13:31:48 +03:00
levlam
564cbc0345 Don't log updates with slightly old PTS short after updates with very old PTS. 2023-07-29 15:37:15 +03:00
levlam
5ba7e14be0 Improve logging for PTS gaps. 2023-07-28 18:10:24 +03:00
levlam
ff3a8e446e Add MessagesManager::load_last_dialog_message instead of get_history_from_the_end. 2023-07-28 14:33:54 +03:00
levlam
58a1ae8e8d Directly call get_history_impl if appropriate. 2023-07-28 14:19:43 +03:00
levlam
f5a066f7ed Support loading of history from the end in get_history_impl. 2023-07-28 14:12:22 +03:00
levlam
73d5b2dcbb Simplify calls to load_messages. 2023-07-28 13:50:02 +03:00
levlam
c071678be1 Add source to MessagesManager::get_history_impl. 2023-07-28 13:32:07 +03:00
levlam
2dba29669f Delete unused MessagesManager::get_history. 2023-07-28 13:22:52 +03:00
levlam
16183df0aa Adjust offset and limit in get_history_impl. 2023-07-28 13:22:07 +03:00
levlam
bd0ca2d6fc Combine all getChatHistory queries. 2023-07-28 03:36:21 +03:00
levlam
9618d58732 Combine get_history_from_the_end queries. 2023-07-27 20:40:56 +03:00
levlam
070399c89a Add combine_hashes function. 2023-07-27 19:05:15 +03:00
levlam
5c8b12b105 Simplify limit initialization in get_history_from_the_end_impl. 2023-07-27 18:19:10 +03:00
levlam
0a7c87eb8b Use FlatHashMap in SeqKeyValue. 2023-07-27 13:58:20 +03:00
levlam
1fbbecca9b Don't register message users/channels for bots. 2023-07-27 13:16:48 +03:00
levlam
be64ce7049 Don't generate unused define FAIL. 2023-07-27 13:02:49 +03:00
levlam
32043df840 Parse updates in another thread. 2023-07-27 12:52:29 +03:00
levlam
56adf14116 Improve PTS gap repair. 2023-07-26 22:04:57 +03:00
levlam
e6cd1989bf Fix Global initialization. 2023-07-26 21:37:54 +03:00
levlam
35df6e3dfd Optimize FileManager::get_file_object by moving implementation of getters to FileNode. 2023-07-26 18:07:33 +03:00
levlam
e12d66af4c Cache remote_location. 2023-07-26 17:34:26 +03:00
levlam
bb1d0d244a Optimize FileView const methods. 2023-07-26 17:09:08 +03:00
levlam
2cf1722b5b Move get_persistent_file_id/get_unique_file_id to FileNode to speed up. 2023-07-26 16:57:32 +03:00
levlam
899197448e Load unknown viewed stories. 2023-07-26 15:35:38 +03:00
levlam
f33dbfb97f Optimize on_get_user. 2023-07-26 15:32:35 +03:00
levlam
38fe2d7cb2 Support NetQueryCreator without Scheduler. 2023-07-26 14:46:31 +03:00
levlam
5bc2634d12 Use FlatHashMap for random_id_to_message_id. 2023-07-26 13:38:10 +03:00
levlam
968bfc48df Move main Session to database scheduler if there is no database. 2023-07-26 13:13:21 +03:00
levlam
06731d965d Move get_database_scheduler_id to Global. 2023-07-26 13:05:34 +03:00
levlam
e8d92b0dcb Make MtprotoHeader thread-safe. 2023-07-26 12:48:59 +03:00
levlam
1ab81f426c Ensure that NetQueryCreator doesn't access Td from another thread. 2023-07-26 12:29:36 +03:00
levlam
c920536260 Optimize FullRemoteFileLocation comparison operators. 2023-07-25 21:47:51 +03:00
levlam
70db527023 Optimize PhotoSizeSource comparison. 2023-07-25 20:31:45 +03:00
levlam
a231b96a7b Improve PTS gap logging. 2023-07-25 14:24:44 +03:00
levlam
0edd5b1651 Support "CHANNEL_INVALID" errors in response to channels.getDifference. 2023-07-25 14:12:58 +03:00
levlam
8c6f5ece88 Ignore updates of unneeded User fields by bots. 2023-07-25 13:45:55 +03:00
levlam
17d26321a5 Decrease gap fill wait time. 2023-07-25 13:06:59 +03:00
levlam
8893dc808f Ignore getDifference responses with invalid polls. 2023-07-24 19:42:09 +03:00
levlam
5110a188b2 Improve MessageReplyInfo logging and updating. 2023-07-24 15:56:03 +03:00
levlam
62677720fc Immediately unload messages in closed chats after updates.channelDifferenceTooLong. 2023-07-24 15:42:38 +03:00
levlam
53c7cfbf02 Reload chat/channel with delay after status has changed. 2023-07-24 13:43:21 +03:00
levlam
1f6342c88e Retry loading of channel difference later if receive invalid poll in a message. 2023-07-23 20:42:30 +03:00
levlam
a0feba5761 Add source to on_update_active_stories. 2023-07-23 09:50:26 +03:00
levlam
4896962420 Remove outdated condition. 2023-07-23 09:46:22 +03:00
levlam
451c559539 Add various checks. 2023-07-23 01:41:59 +03:00
levlam
2f4b8ba8b3 Don't allow replies to supergroup creation message. 2023-07-22 23:07:51 +03:00
levlam
102222e64f Add source to on_update_channel_max_unavailable_message_id. 2023-07-22 22:40:26 +03:00
levlam
21074688c3 Ignore "TOPIC_CLOSED" errors for SaveDraftMessageQuery. 2023-07-22 22:37:27 +03:00
levlam
ad5f37e99e Fix applying of updates about pinned forum topics. 2023-07-22 21:53:32 +03:00
levlam
7498aad742 Improve handling of message reading up to unknown message. 2023-07-22 20:03:35 +03:00
levlam
ea848ff2e4 Fix MessagesManager::can_delete_dialog. 2023-07-22 19:58:26 +03:00
levlam
925f944743 Improve error logging. 2023-07-22 19:43:47 +03:00
levlam
9bebe6dff6 Skip updateChannelTooLong in unknown chats. 2023-07-22 19:17:55 +03:00
levlam
36ae033843 Improve logging. 2023-07-22 19:03:29 +03:00
levlam
ad8e887aae Keep error logging for invalid unread count only if the counters are recalculated. 2023-07-22 18:58:01 +03:00
levlam
2eef3a459b Add source to save_active_stories. 2023-07-22 18:19:05 +03:00
levlam
b5f1e6a772 Fix updating of active stories. 2023-07-22 18:10:51 +03:00
levlam
78d69a296e Send update with 0 order before moving chatActiveStories to another story list. 2023-07-22 17:49:39 +03:00
levlam
b87dc811ba Delete inaccessible stories. 2023-07-22 17:04:08 +03:00
levlam
02456042d6 Avoid expected error logging. 2023-07-22 16:38:56 +03:00
levlam
4984307f36 Improve logging. 2023-07-22 14:16:49 +03:00
levlam
44c58ee242 Move logging of OS freezes to WARNING. 2023-07-22 14:06:57 +03:00
levlam
11c9f78538 Fix inputStoryContentPhoto documentation. 2023-07-22 01:32:48 +03:00
levlam
f817d79b7d Hide unneeded app config option "stories_export_nopublic_link". 2023-07-21 17:42:30 +03:00