Repository navigation
Commit f8724e2
Honor the configured Discord private-message format (#6644)
### Information
This PR fixes #6641.
### Details
**Proposed fix:**
Read the private-message format from `messages.pms-to-discord`, matching
the shipped config. The settings loader currently reads
`messages.private-chat` instead, so a custom format is ignored and the
default `[SocialSpy]` text is used.
Added settings tests that load real YAML files and check the custom
format, default fallback and reload, including placeholders and
apostrophes. The Discord module now includes the core project on its
test classpath.
**Environments tested:**
OS: Windows
Java version: Temurin 25.0.4.1+1
- [ ] Most recent Paper version
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
The full Gradle build passes, including the new settings tests and
Checkstyle. Live Paper/Discord relay testing was not performed.
**Demonstration:**
The regression loads this configuration:
```yaml
messages:
pms-to-discord: "[Privado] {sender-displayname} -> {receiver-displayname}: {message}"
```
Before the fix, the actual settings loader produces `[SocialSpy] sender
-> receiver: Hello`. After the fix, it produces `[Privado] Sender ->
Receiver: Hello`. The missing-key control keeps the existing default.
---------
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>1 parent e70bdb8 commit f8724e2
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| |||
0 commit comments