Skip to content
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

[Enhancement]: Add new notifications documentation #32

Open
1 task done
jonbarrow opened this issue Dec 4, 2024 · 3 comments
Open
1 task done

[Enhancement]: Add new notifications documentation #32

jonbarrow opened this issue Dec 4, 2024 · 3 comments
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase

Comments

@jonbarrow
Copy link
Member

Checked Existing

  • I have checked the repository for duplicate issues.

What enhancement would you like to see?

@ZeroSkill1 has been doing some reverse engineering and made some notes on some missing notification types:

  • NintendoNotification type 6 = "3DS profile updated". Sends NintendoNotificationEventProfile to friends when you update your profile. Can be triggered by changing the system language in System Settings
  • NintendoNotification type 8 = "3DS friend deleted". Sends NintendoNotificationEventGeneral to the friend being removed when a user deletes their friend card. m_u64Param2 is set to the timestamp the friend was deleted on. Relationship type to 3 (Deleted) in the friends client
  • NintendoNotification type 9 = Unknown. The 3DS friends client has a handler for this but cannot get the server to trigger it. Zero mentioned seeing it try to handle m_JoinGameID so maybe it's related to the "join game" feature?
  • Notification types 100/101-108 seem to be game-specific for triggering custom functionality. This was heuristically determined by the following logic, so I believe it's safe to document these types as game-specific even if we don't have 100% confirmation on the starting point:
    • Both Zero and Pablo independently discovered types 107 and 108 in Mario Kart 7. Pablo previously found these types and determined that they trigger a flag to be set/unset in Mario Kart 7 which controls whether or not to upload race logs to the server. Zero then also confirmed these notifications/flags independently
    • We know that type 109 is not game-specific, so the last game-specific type MUST be 108
    • Other Nintendo enums are structured in a way that makes sense for types 100/101 to be the starting game-specific type. Nintendo seems to like to begin "groups" of enum values like this at what I call "clean" locations (0, 10, 100, etc.), but they sometimes skip the "0" value of a group even if (so starting at 101 rather than 100 where 100 wouldn't be used or means something invalid)

Any other details to share? (OPTIONAL)

No response

@jonbarrow jonbarrow added enhancement An update to an existing part of the codebase awaiting-approval Topic has not been approved or denied labels Dec 4, 2024
@DaniElectra DaniElectra added approved The topic is approved by a developer and removed awaiting-approval Topic has not been approved or denied labels Dec 4, 2024
@DaniElectra
Copy link
Member

NintendoNotification type 9 = Unknown. The 3DS friends client has a handler for this but cannot get the server to trigger it. Zero mentioned seeing it try to handle m_JoinGameID so maybe it's related to the "join game" feature?

The friends 3DS protocol has a method named SendInvitation, and it is supposedly available on the API for the friends sysmodule according to 3dbrew. I wonder if that may be related to this notification?

@jonbarrow
Copy link
Member Author

That sounds very likely. I naturally assumed that the 3DS worked the same way as the WiiU in this regard (the WiiU does the "join game" thing via the users presence data, not a dedicated notification) but I forgot about that NEX method. That's almost certainly it

@ZeroSkill1
Copy link
Contributor

I have now confirmed that notification type 9 corresponds to "friend sent invitation". Using the official servers, I was able to receive this notification after manually calling SendInvitation on one system using the friends sysmodule's API, and intercepting the friends module for notifications on another system.

The server sends a NintendoNotificationEventGeneral object to the client, with only the m_u64Param2 set to a Timestamp. This object is not used by the friends client. Unlike the handlers for other notifications, it doesn't even check whether the object was sent in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase
Projects
None yet
Development

No branches or pull requests

3 participants