Commit Graph

192 Commits

Author SHA1 Message Date
Jonathan Barrow
7bc3dbf4f1 fix: use Copy() on presence data to get around race condition 2024-05-16 07:43:26 -04:00
Jonathan Barrow
c1e06be4d5 Merge pull request #17 from DaniElectra/norows-fix 2024-05-15 18:42:29 -04:00
Daniel López Guimaraes
116b5c7df5 fix(database): Proper checks on QueryRow for sql.ErrNoRows 2024-05-15 23:02:28 +01:00
Jonathan Barrow
9855dea445 refactor(wiiu): dont track NNAInfo in user state, use the DB 2024-05-12 15:56:24 -04:00
Jonathan Barrow
915b52c88d chore: migrate to SQL manager 2024-04-27 16:22:30 -04:00
Jonathan Barrow
e54e6b92b1 Merge pull request #15 from DaniElectra/database-defaults 2024-04-22 16:38:44 -04:00
Daniel López Guimaraes
a662ca1961 database/3ds: Remove old comment 2024-04-20 13:51:00 +01:00
Daniel López Guimaraes
f4a4b2830b database: Update database defaults and add country
This prevents errors when scanning the fields on the database
2024-04-20 13:44:44 +01:00
Daniel López Guimaraes
7aef2f1750 notifications/3ds: Send events to the target user 2024-04-20 13:43:13 +01:00
Jonathan Barrow
e2a630d1a7 wiiu: add nil check in SendPresenceUpdate 2024-04-09 14:30:47 -04:00
Jonathan Barrow
af603f2295 fix: close rows when existing database functions 2024-04-09 14:28:04 -04:00
Jonathan Barrow
9e5a02d286 wiiu: fix nil connectedUser not being updated 2024-04-09 12:45:11 -04:00
Jonathan Barrow
f2cc882fb2 chore: update Go modules 2024-04-09 12:22:29 -04:00
Jonathan Barrow
18e1a0fefa chore: migrate ConnectedUser map to MutexMap 2024-04-09 12:21:50 -04:00
Jonathan Barrow
d6fdde6161 chore: add guest account 2024-04-08 16:23:06 -04:00
Jonathan Barrow
491b475a9c chore: remove debug logging 2024-04-08 16:09:43 -04:00
Jonathan Barrow
50325cf7c2 3ds: temp revert error check in GetFriendPersistentInfos 2024-04-08 15:55:00 -04:00
Jonathan Barrow
4d299a3612 rewrite: Migrate to v2 libraries and small bug fixes 2024-04-08 08:53:39 -04:00
Daniel López Guimaraes
b5d34d8db4 Update RMC method creation 2023-12-16 16:09:47 +00:00
Daniel López Guimaraes
e3da081f52 Update with latest changes 2023-12-14 23:25:28 +00:00
Daniel López Guimaraes
1a6b641543 Update with latest changes 2023-12-10 19:46:09 +00:00
Jonathan Barrow
1596eeea45 updated StationURL handling 2023-11-24 17:41:31 -05:00
Jonathan Barrow
90a71d2ca2 updated to new stream functions 2023-11-18 15:25:50 -05:00
Daniel López Guimaraes
7281dd5a52 Replace slices.Contains to Equals check
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.
2023-11-17 19:22:08 +00:00
Jonathan Barrow
7acf46affe Merge pull request #11 from imora7024/nex-go-rewrite
fixed comment typo in set_user_blocked.go
2023-11-16 16:29:15 -05:00
Jonathan Barrow
abb19ddf43 make 3DS friends display as online again 2023-11-16 16:24:06 -05:00
Imora
f123393866 fixed comment typo in set_user_blocked.go 2023-11-16 15:19:27 -06:00
Jonathan Barrow
6916dbb1c1 fixed database usage of new DateTime API 2023-11-16 00:01:37 -05:00
Jonathan Barrow
de11455a1b use new PID, DateTime and method returns 2023-11-14 22:47:52 -05:00
Jonathan Barrow
cb82df0e20 use new PID type 2023-11-13 01:22:34 -05:00
Jonathan Barrow
91b13c31a4 work with new nex-go 2023-11-12 06:48:13 -05:00
Jonathan Barrow
efe121a7a9 update Go modules 2023-10-13 18:26:06 -04:00
Jonathan Barrow
cc9b839d45 Merge pull request #8 from DaniElectra/friends-mii
Update FriendPersistentInfo on 3DS
2023-10-08 19:14:12 -04:00
Daniel López Guimaraes
3f48ae8306 Update FriendPersistentInfo on 3DS
One of the DateTimes doesn't represent the date of the friendship, but
when the friend has updated their Mii.

I noticed this when playing with the friend servers researching
information about the data stored on the FRD sysmodule.

The friendship date is still stored internally, but it's not provided to
the user anymore.
2023-10-08 19:24:58 +01:00
Jonathan Barrow
73871a4537 remove database.PIDArrayToString in favor of pq.Array 2023-10-06 19:13:19 -04:00
Jonathan Barrow
b3feb8c7d6 Merge pull request #7 from DaniElectra/errors
Improve error handling and rename go project
2023-08-15 17:19:59 -04:00
Daniel López Guimaraes
502035dc74 Replace return empty lists with nil 2023-08-15 21:35:33 +01:00
Daniel López Guimaraes
77a1cc11aa Add missing error handling (part 2) 2023-08-15 20:59:12 +01:00
Daniel López Guimaraes
06d89d8b77 Add missing error handling and update modules 2023-08-15 20:56:01 +01:00
Daniel López Guimaraes
84566dd6a8 Move GetUserDataByPID to utility 2023-08-14 13:17:48 +01:00
Daniel López Guimaraes
36b0b7f3fb Add missing error handling on GRPC method 2023-08-13 23:30:12 +01:00
Daniel López Guimaraes
2d1e087fac Replace stubs with NotImplemented 2023-08-13 23:28:44 +01:00
Daniel López Guimaraes
8d8a05a7e2 Add missing error handling
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.
2023-08-13 23:19:34 +01:00
Daniel López Guimaraes
2f80336681 Rename friends-secure to friends and remove Mongo
Replace MongoDB usage with GRPC calls to the account server. Also
include documentation on the README and a Makefile.
2023-08-13 01:05:08 +01:00
Daniel López Guimaraes
3d5e78f532 Improve 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.
2023-08-12 23:53:21 +01:00
Jonathan Barrow
2c1cdba561 Merge pull request #6 from PretendoNetwork/new-style
Merge authentication server to make a singular codebase
2023-07-19 16:42:20 -04:00
SuperMarioDaBom
5a62bb2aa2 Fix typo (v1->v0) 2023-07-18 11:41:18 -07:00
SuperMarioDaBom
4108f4baad Convert to modern result code handling 2023-07-18 11:41:01 -07:00
SuperMarioDaBom
1779a4c727 Add RegisterEx override, remove unneeded Register function 2023-07-18 11:40:36 -07:00
SuperMarioDaBom
c5a6b31d68 Remove unnecessary function call, fix typo 2023-07-18 11:34:54 -07:00