Audit ChatMessageType coverage end-to-end#60
Open
phyceClaw wants to merge 1 commit into
Open
Conversation
Goes through every value in net.runelite.api.ChatMessageType and makes
sure each one is either (a) explicitly voiced and gated by a sensible
config toggle, or (b) explicitly muted. Previously many types fell into
the silent "didn't match" branch in onChatMessage and were dropped
entirely.
Bug fixes:
* MODPRIVATECHAT was listed in both isChatInnerVoice and
isChatOtherPlayerVoice. Inner won the if/else, so an incoming PM
from a mod was spoken in the local player's voice. Removed from
isChatInnerVoice so MODPRIVATECHAT now correctly uses the mod's
voice via the other-player path.
* CHALREQ_TRADE / CHALREQ_FRIENDSCHAT / CHALREQ_CLANCHAT were gated
on requestsEnabled but never routed to any voice, so even when
enabled they fell through to "didn't match" and never spoke. Added
to isChatSystemVoice.
Voice routing for previously-dropped types:
* TRADE_SENT -> inner voice (it's your own action)
* FRIENDNOTIFICATION, FRIENDSCHATNOTIFICATION, SNAPSHOTFEEDBACK,
DIDYOUKNOW, LEVELUPMESSAGE -> system voice
* SPAM, MODAUTOTYPER -> always muted (matches existing AUTOTYPER)
Config gating consistency. System-voice types that were previously
ungated now respect systemMesagesEnabled the way GAMEMESSAGE / WELCOME
already do:
* ENGINE, BROADCAST, IGNORENOTIFICATION, TRADE, PLAYERRELATED,
TENSECTIMEOUT, SNAPSHOTFEEDBACK, CLAN_GIM_FORM_GROUP,
CLAN_GIM_GROUP_WITH -> systemMesagesEnabled
Dual-gating for system messages that live inside a chat channel
(following the CLAN_MESSAGE precedent from PR phyce#40):
* LOGINLOGOUTNOTIFICATION, FRIENDNOTIFICATION,
FRIENDSCHATNOTIFICATION -> friendsChatEnabled + systemMesagesEnabled
* CLAN_CREATION_INVITATION -> clanChatEnabled + systemMesagesEnabled
Single-purpose gating with new toggles:
* DIDYOUKNOW -> new didYouKnow toggle (default off)
* LEVELUPMESSAGE -> new levelUpMessages toggle (default off)
Request-class:
* TRADE_SENT -> requestsEnabled (joins the existing TRADEREQ /
CHALREQ_* gate).
Out of scope / follow-up:
* MESBOX (dialog box / book pages) needs widget plumbing like DIALOG
has - left for a separate PR.
* NPC_SAY likely duplicates OverheadTextChanged - left until verified.
* CLAN_GIM_FORM_GROUP / CLAN_GIM_GROUP_WITH are currently single-gated
on system messages here; after PR phyce#47 lands they could be
dual-gated with groupIronmanChatEnabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
End-to-end pass over
net.runelite.api.ChatMessageType. Every value is now either explicitly voiced (with a sensible config gate) or explicitly muted — no more silent drops through the "didn't match" branch.Bug fixes
MODPRIVATECHATduplicated in bothisChatInnerVoiceandisChatOtherPlayerVoiceCHALREQ_TRADE/CHALREQ_FRIENDSCHAT/CHALREQ_CLANCHAThad a request-gate but no voice routingisChatSystemVoiceVoice routing for previously-dropped types
TRADE_SENT→ inner voice (it's your own action)FRIENDNOTIFICATION/FRIENDSCHATNOTIFICATION/SNAPSHOTFEEDBACK/DIDYOUKNOW/LEVELUPMESSAGE→ system voiceSPAM/MODAUTOTYPER→ always muted (matches existingAUTOTYPER)System-message gating consistency
Previously only
GAMEMESSAGE/WELCOME/CONSOLEactually respectedsystemMesagesEnabled. Now all system-voice types do:ENGINE,BROADCAST,IGNORENOTIFICATION,TRADE,PLAYERRELATED,TENSECTIMEOUT,SNAPSHOTFEEDBACK,CLAN_GIM_FORM_GROUP,CLAN_GIM_GROUP_WITH→ gated onsystemMesagesEnabled.Dual-gating (channel + system)
Following the precedent PR #40 set for
CLAN_MESSAGE:LOGINLOGOUTNOTIFICATION,FRIENDNOTIFICATION,FRIENDSCHATNOTIFICATION→friendsChatANDsystemMesages(these are system messages about friends).CLAN_CREATION_INVITATION→clanChatANDsystemMesages.New toggles (Speech Generation section)
didYouKnowlevelUpMessagesBoth default off — they're frequent and most users probably don't want them.
Request-class
TRADE_SENT→requestsEnabled(joins existingTRADEREQ/CHALREQ_*).Out of scope / follow-ups
MESBOX(dialog box / book pages) needs widget plumbing likeDIALOGalready has — separate PR.NPC_SAYlikely duplicatesOverheadTextChangedevents — leaving until verified to avoid double-speech.CLAN_GIM_FORM_GROUP/CLAN_GIM_GROUP_WITHare gated onsystemMesagesalone here. After PR Add Group Ironman chat support (issue #26) #47 lands they should be dual-gated ongroupIronmanChatEnabled + systemMesagesto matchCLAN_GIM_MESSAGE.CLAN_GUEST_MESSAGEtoisChatSystemVoiceand gates it onclanGuestChat + system. Whichever of these two PRs merges second will hit a trivial conflict in those same locations — keep both branches' additions.Test plan
requestsenabled).requestsenabled).friendsChatANDsystemMesagesare on.didYouKnowon → next "Did you know?" tip speaks.levelUpMessageson → next level-up "Check the skill guide" line speaks.systemMesagesoff → all system types fall silent (login/logout, broadcasts, trade complete, etc.).🤖 Generated with Claude Code
On behalf of @phyce