Initializing the server accounts in their own thread (e.g. the
authentication and secure servers) can cause a race condition where the
secure account hasn't been set up yet when authentication configures
`ticket-granting`, causing sometimes crashes on startup.
This has happened on production causing unnecesary restarts. To fix
this, initialize the accounts on the `init` function to ensure they will
always be accessible when needed.
Add Mii profanity flag and character set to the 3DS friends database.
This in theory allows better support of Mii names that use characters
exclusive to the following regions: CHN, KOR or TWN.
Also get the Mii changed timestamp from the database, and not use the
current time for it.
Update the go modules to get the latest stability updates and use the
new fields on the Mii structure.
The sender PID of the notification was being set to the target PID,
instead of the sender PID. Use correct PID and remove redundant target
PID argument.
Also fix minor accuracy issues.
We can't use slices.Contains anymore since now we are comparing
pointers, and the check would always return false. Replace with using
the Equals function.
Now database getters do error handling aswell, and in case of any error,
the NEX or GRPC method throws a proper error about it.
There are still some doubts on how to handle errors when a list of data
is processed, so for now skip that element on the list and continue.
Also add some constant errors to do better error handling.
Now that we can return errors to nex-protocols-go and it will handle it,
we can improve how errors are being handled in friends.
There's probably room for improvement from this, since I haven't added
error handling on some database getters due to uncertainties on whether
the error should interrupt an action or not.