-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweaks from the last few years #24
Open
CDAGaming
wants to merge
64
commits into
jagrosh:master
Choose a base branch
from
CDAGaming:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
- Also sync with CraftPresence's contents over the last two years
CDAGaming
added a commit
to CDAGaming/CraftPresence-Mirror
that referenced
this pull request
Sep 25, 2022
- Planning to merge the IPC data back into the origin as jagrosh/DiscordIPC#24 so this refactor just ensures it goes to that. - IPC logging is also visually distinct with this change, as it is not using log4j
- Broke it during initial refactoring
- I truly don't know what past me was on going away from this, chief.
- shadowJar likes to shadow everything, including runtimeOnly stuff
- Will use an alternative method for maven
There's a lot to unpack here. While there are plenty of changes in this that I'd love to see get merged in, there's also a lot that I don't think should be added. This isn't a comprehensive list or review, but just a start for some of the things I think should be removed before this could be merged:
|
- This change integrates the Backoff logic from the Official RPC SDK, so that in the event of a disconnection, the Client will attempt to reconnect in subsequent `connect` executions, with increasing delays between `0.5 seconds` and `one minute` - This only changes the behavior for an unexpected disconnection (Such as sending a Presence update while not connected to the RPC), it does not impact a manual close (`onClose`)
- Added a `nickname` field to the user object, with a getter - `name` field renamed to `username` (`getName` remains the same name for compatibility) - Added `getEffectiveName` to retrieve the best display name (`username` if nickname is null, otherwise `nickname`)
…global_name` - This further refines the future-proofing, and fixes an issue that can occur with no global name
- Use Lenni Reflect to reflect without needing add-opens - Also updated plugins, and recall Java 7 Support
- Updated SLF4J to 2.0.10 (Was 2.0.7) - Updated JUnixSocket to 2.8.3 (Was 2.7.0) - Updated Lenni Reflect to 1.3.2 (Was 1.2.4) - Updated Maven Javadoc Plugin to 3.6.3 (Was 3.5.0)
- Updated SLF4J-API to 2.0.12 (Was 2.0.10)
- Updated JUnixSocket to 2.9.0 (Was 2.8.3)
- Updated JUnixSocket to 2.9.1 (Was 2.9.0)
- Updated SLF4J to 2.0.13 (Was 2.0.12)
- Updated Lenni Reflect (1.3.2 -> 1.3.4)
- Updated GSON (2.10.1 -> 2.11.0)
- Should fix support for Java 22 on Windows, where this issue came up
- `Thread.sleep` call now matches all the others
- Adjusted the `WindowsPipe` to throw a proper `RuntimeException` in cases where we are unable to write to a IPC pipe (There is a difference from `exists` to `can read/write`) - A commit awhile ago broke the prior behavior, allowing the Pipe to be written to, causing another exception later. This change lets it fail more safely and as expected - Clarified the error message for when an `IOException` is thrown for the Mac/Unix pipes - Its a bit vague since it triggers under almost any type of operation failure - Replaced a `printStackTrace` call in `IPCClient#connect` for autoRegister behavior, so it'll now use the logger for the `debugMode` version - Clarified error message for if the `WinRegistry` constructor fails
- No longer necessary
- No longer necessary
- Corrected documentation for several files - Enforce Java 8+ behaviors, fully dropping Java 7 support (As tools exist now to handle downgrading)
- Added the 6th Default Avatar ID, which is only available to Migrated users - Fixed `getDefaultAvatarId` for legacy users, and to more clearly represent discord documentation
- Fixed incorrect `commandKeyName` allocation
- Updated JUnixSocket (`2.9.1` -> `2.10.0`) - Updated maven-javadoc-plugin (`3.6.3` -> `3.8.0`)
- Ported from another project I created
- Updated SLF4J to 2.0.16 - Updated JUnixSocket to 2.10.1 - Updated Maven Javadoc Plugin to 3.10.1
- Updated LenniReflect to 1.4.0 - Updated maven-javadoc-plugin to 3.11.1
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.
I run a minecraft mod called CraftPresence that, until recently, was using a jar-in-jar'd fork of this implementation of Discord's IPC system.
There will probably be quite a few questions, of which I'd be glad to answer, though I still plan to keep maintaining this fork so long as mod my mod keeps growing. Thank you again for making this amazing tool, as it's been fun to keep it going for awhile +1
Here is a list of changes that have come over time, in a greatly summarized form:
autoRegister
support (WinRegistry
class added for Windows, tested up to Java 17/18)discord.com
instead ofdiscordapp.com
where applicable (New endpoint)partyPrivacy
and thebuttons
arrayipc pipe
from the Snap and Flatpak Distributions of Discord