Dialog: Provide hints for the sender name

The dialog form has a simple text input for the sender's name.
This can lead to typos or mistakes if the GM wants to send a message
using the same sender name as a previous message.

Add a new function that goes through all the players' histories and
compiles a list of all unique senders, which we can then use to build
a list of hints that will be used to show suggestions when the GM fills
the sender name in the form.

This is currently quite ineficcient as it re-does all the work for every
single dialog.
A better way would be to cache it or store it explicitly somewhere when
we send a message, but this would require a way for the GM to edit it.
This commit is contained in:
trotFunky 2025-06-11 18:48:44 +01:00
parent 30c0324799
commit d2b14dbe94
3 changed files with 64 additions and 0 deletions

View file

@ -31,6 +31,8 @@ each page containing the messages from one specific recipient.
Both the journals and pages will be created automatically.
Players only have observer permissions on their own journal, which will take the name of their
character, or their own if they don't control one yet.
If the history is enabled, the message form will go look for previous senders' names and provide
a list for autocompletion.
The GM can send a message to an offline player, which will add it to its history if it is enabled,
but won't show up as a pop-up when they next log in.