Cockatrice/cockatrice
BruebachL 765ebf8fb1
[UserList] Context menu invite (#7138)
* [Client] Send game invites from the user context menu via a private message

The user context menu gains an "Invite to Game" submenu listing the
inviteable games in the room (the inviter's own games, honoring the
buddy-only setting). Picking one opens a private message to the target
user with a cockatrice://joingame link naming the game, so the target
gets a clickable invite instead of a raw URL. Multi-game rooms offer a
picker; a single inviteable game sends directly. Sending a message to
an offline user no longer swallows the draft — it reports that the
user is offline and keeps the typed text.

Took 50 seconds


Took 3 minutes

* [Client] Extract sendPrivateMessage() to fix invite message draft overwrite

sendInviteMessage() was calling sayEdit->setText(text) then sendMessage(),
which overwrites any text the user had typed.  Extract the command-building
and sending logic into a new sendPrivateMessage(const QString &text) method
that takes the text directly.  sendMessage() now calls it after its guards
and clears sayEdit; sendInviteMessage() calls it directly without touching
the input field at all.

Took 33 minutes

* Rename method, address comments.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-17 10:49:19 +02:00
..
resources [DlgSettings] Refactor: split SettingsPage into separate files (#6899) 2026-05-18 01:59:02 -07:00
sounds Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
src [UserList] Context menu invite (#7138) 2026-08-17 10:49:19 +02:00
themes Update CMakeLists.txt (#6898) 2026-05-17 16:15:15 +02:00
translations Update translation files (#7044) 2026-07-16 09:07:33 +02:00
.qdevelop icon_draw and icon_untap added, icon_general and icon_messages modified 2009-07-31 13:37:16 +02:00
CMakeLists.txt [Game] Extract makeGameJoinLink helper for cockatrice://joingame links (#7133) 2026-08-16 22:14:49 +02:00
cockatrice-cod.xml Define Cockatrice as an editor/handler for .cod files and cockatrice:// protocol on all platforms (#6775) 2026-08-08 19:02:19 +02:00
cockatrice.desktop Define Cockatrice as an editor/handler for .cod files and cockatrice:// protocol on all platforms (#6775) 2026-08-08 19:02:19 +02:00
cockatrice.qrc Add generic colorless mana symbol (#6873) 2026-05-17 19:48:48 +02:00
cockatrice.rc Included uninstaller for Windows version 2010-09-17 15:26:07 +02:00
cockatrice_en@source.ts Update translation source strings (#7028) 2026-07-01 16:25:10 +02:00