Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb
SwitchOCE 7709184ecc
[Server] Let users fetch their own private chat history (#7506)
* [Server] Let users fetch their own private chat history

Players lose their private conversations on reconnect or on another
device. Servatrice can already log private messages, but only
moderators can read the logs.

Add Command_GetPrivateChatHistory / Response_PrivateChatHistory so a
registered user can page through their own logged conversation with one
other user. Operators opt in with logging/allow_user_chat_history
(default off, and log_user_msg_chat must be on). The caller is matched
by account id so reused guest or deleted-account names can't read older
messages; only time, sender name and text are returned. Pages hold
1..200 messages and never split a second, since log_time has 1-second
resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [Server] Harden private chat history identity matching

Match both participants by account id and name so a federated user's remote id cannot collide with a local account, and stop storing foreign ids in the local chat log. Extract the paging assembly into a pure helper and cover the whole-second boundary rules with gtests.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
2026-11-09 13:21:43 +01:00
..
admin_commands.proto [Server/Client/Protocol] Add developer staff role (#7211) 2026-09-11 17:18:56 +02:00
card_attributes.proto
CMakeLists.txt [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
color.proto
command_attach_card.proto
command_change_zone_properties.proto
command_concede.proto
command_create_arrow.proto add phase to delete arrows in to protocol (#6159) 2025-11-26 09:16:10 -05:00
command_create_counter.proto
command_create_token.proto
command_deck_del.proto
command_deck_del_dir.proto
command_deck_download.proto
command_deck_download_public.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_list.proto
command_deck_list_other_user.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_new_dir.proto
command_deck_select.proto
command_deck_set_visibility.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_share_create.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_share_download.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_share_list.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_share_list_mine.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_share_remove.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_deck_upload.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
command_del_counter.proto
command_delete_arrow.proto
command_draw_cards.proto
command_dump_zone.proto
command_flip_card.proto
command_game_say.proto
command_get_private_chat_history.proto [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
command_get_server_stats.proto [Server/Client/Protocol] Add developer staff role (#7211) 2026-09-11 17:18:56 +02:00
command_inc_card_counter.proto
command_inc_counter.proto
command_kick_from_game.proto
command_leave_game.proto
command_move_card.proto [Server] Support face-down cards in all public zones (#6539) 2026-03-03 23:17:35 +01:00
command_mulligan.proto
command_next_turn.proto
command_ready_start.proto
command_replay_delete_match.proto
command_replay_download.proto
command_replay_download_by_game_id.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_replay_get_code.proto
command_replay_list.proto
command_replay_modify_match.proto
command_replay_submit_code.proto
command_report.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_add_comment.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_assign.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_details.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_list.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_my_list.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_reopen.proto [Report] Add report reopen action for closed reports (#7442) 2026-10-11 15:28:45 +02:00
command_report_resolve.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_stats.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_report_user_info.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
command_reveal_cards.proto [Game] Reveal multiple distinct random hand cards to a recipient (#7753) 2026-11-08 16:41:14 +01:00
command_reverse_turn.proto
command_roll_die.proto
command_set_active_phase.proto
command_set_card_attr.proto
command_set_card_counter.proto
command_set_counter.proto
command_set_player_order.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
command_set_playmat.proto [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
command_set_sideboard_lock.proto
command_set_sideboard_plan.proto
command_shuffle.proto
command_undo_draw.proto
commands.proto [Server/Client/Protocol] Add developer staff role (#7211) 2026-09-11 17:18:56 +02:00
context_concede.proto
context_connection_state_changed.proto
context_deck_select.proto
context_move_card.proto
context_mulligan.proto
context_ping_changed.proto
context_ready_start.proto
context_set_sideboard_lock.proto
context_undo_draw.proto
developer_commands.proto [Server/Client/Protocol] Add developer staff role (#7211) 2026-09-11 17:18:56 +02:00
event_add_to_list.proto
event_attach_card.proto
event_change_zone_properties.proto
event_connection_closed.proto
event_create_arrow.proto
event_create_counter.proto
event_create_token.proto
event_del_counter.proto
event_delete_arrow.proto
event_destroy_card.proto
event_draw_cards.proto
event_dump_zone.proto
event_flip_card.proto
event_game_closed.proto
event_game_host_changed.proto
event_game_joined.proto
event_game_log_notice.proto [Server][Game] Make undo draw failure visible in chat (#6889) 2026-05-20 02:23:02 -07:00
event_game_say.proto
event_game_state_changed.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
event_join.proto
event_join_room.proto
event_kicked.proto
event_leave.proto
event_leave_room.proto
event_list_games.proto
event_list_rooms.proto
event_move_card.proto
event_notify_user.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
event_player_order_changed.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
event_player_properties_changed.proto
event_remove_from_list.proto
event_remove_messages.proto
event_replay_added.proto
event_reveal_cards.proto
event_reverse_turn.proto
event_roll_die.proto
event_room_channel_say.proto [Protocol] Add room chat channel extensions and catalog payload (#7475) 2026-10-16 22:46:37 +02:00
event_room_say.proto
event_server_complete_list.proto
event_server_identification.proto [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
event_server_message.proto
event_server_shutdown.proto
event_set_active_phase.proto
event_set_active_player.proto
event_set_card_attr.proto
event_set_card_counter.proto
event_set_counter.proto
event_shuffle.proto
event_user_joined.proto
event_user_left.proto
event_user_message.proto
game_commands.proto [Game] Reveal multiple distinct random hand cards to a recipient (#7753) 2026-11-08 16:41:14 +01:00
game_event.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
game_event_container.proto
game_event_context.proto
game_replay.proto
isl_message.proto
moderator_commands.proto [Alts] Server-side search controls, IP counts, adjustable window (#7517) 2026-11-08 08:59:51 +01:00
move_card_to_zone.proto
response.proto [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
response_activate.proto
response_adjust_mod.proto
response_ban_history.proto
response_card_art_rule_entry.proto [UserListDelegate] Consider providerId (#7018) 2026-06-27 11:23:55 -04:00
response_clear_blacklisted_banners.proto [Server/Client/Protocol] Let moderators clear banner cards (#7546) 2026-10-25 13:19:20 +01:00
response_deck_download.proto
response_deck_list.proto
response_deck_share_create.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
response_deck_share_download.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
response_deck_share_list.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
response_deck_share_list_mine.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
response_deck_upload.proto
response_dump_zone.proto
response_forgotpasswordrequest.proto
response_get_admin_notes.proto
response_get_games_of_user.proto
response_get_server_stats.proto [Client/Server/Protocol] Surface live metrics in the Developer tab (#7212) 2026-09-11 17:18:56 +02:00
response_get_user_info.proto
response_join_room.proto
response_list_users.proto
response_login.proto
response_moderator_last_logins.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_password_salt.proto [Security] Add challenge-response auth with scrypt verifiers and stop storing plaintext passwords (#7193) 2026-10-16 22:52:26 +02:00
response_private_chat_history.proto [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
response_register.proto
response_remove_user_avatar.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_remove_user_banner.proto [Server/Client/Protocol] Let moderators clear banner cards (#7546) 2026-10-25 13:19:20 +01:00
response_replay_download.proto
response_replay_download_by_game_id.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_replay_get_code.proto
response_replay_list.proto
response_report_details.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_report_list.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_report_my_list.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_report_stats.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_report_user_info.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_reset_user_password.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_user_alts.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_user_sessions.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
response_viewlog_history.proto [Logs] Browse room history without filters with paginated infinite scroll (#7531) 2026-11-02 07:36:49 +01:00
response_warn_history.proto
response_warn_list.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
room_commands.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
room_event.proto [Protocol] Add room chat channel extensions and catalog payload (#7475) 2026-10-16 22:46:37 +02:00
server_message.proto
serverinfo_arrow.proto
serverinfo_ban.proto
serverinfo_card.proto
serverinfo_cardcounter.proto
serverinfo_chat_message.proto [Protocol] Add room chat channel extensions and catalog payload (#7475) 2026-10-16 22:46:37 +02:00
serverinfo_counter.proto
serverinfo_deck_share_item.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
serverinfo_deck_share_summary.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
serverinfo_deckstorage.proto [Server] Add deck share links and public deck visibility (#7241) 2026-09-20 20:22:16 +02:00
serverinfo_game.proto [Server/Client/Protocol] Shuffle or reorder player seats before a game starts (#7398) 2026-11-04 15:44:50 +01:00
serverinfo_gametype.proto
serverinfo_moderator_login.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
serverinfo_player.proto
serverinfo_playerping.proto
serverinfo_playerproperties.proto [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
serverinfo_private_chat_message.proto [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
serverinfo_replay.proto
serverinfo_replay_match.proto
serverinfo_report.proto [Report] Add context menu to report queue rows (#7444) 2026-10-11 15:33:47 +02:00
serverinfo_room.proto [Protocol] Add room chat channel extensions and catalog payload (#7475) 2026-10-16 22:46:37 +02:00
serverinfo_room_channel.proto [Server] Gate room channels on privilege levels (#7477) 2026-10-16 22:46:38 +02:00
serverinfo_user.proto [Server/Client/Protocol] Add developer staff role (#7211) 2026-09-11 17:18:56 +02:00
serverinfo_user_alt.proto [Alts] Server-side search controls, IP counts, adjustable window (#7517) 2026-11-08 08:59:51 +01:00
serverinfo_user_session.proto [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00
serverinfo_warning.proto
serverinfo_zone.proto
session_commands.proto [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
session_event.proto