Commit graph

28 commits

Author SHA1 Message Date
Jonathan Barrow
8432cfd6d5
feat: update to latest NEX libs 2025-02-15 23:31:32 -05:00
Daniel López Guimaraes
b77dd1b392
fix(database/3ds): Fix INSERT query for UpdateUserMii
Although the UPDATE section of the query was updated properly, the
INSERT ection was unmodified, which causes type conflicts when trying to
update the user's Mii. Update the INSERT query properly.
2024-05-21 15:44:35 +01:00
Daniel López Guimaraes
f9071cbed3
feat: Update modules and new Mii database fields
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.
2024-05-20 21:55:56 +01: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
915b52c88d
chore: migrate to SQL manager 2024-04-27 16:22:30 -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
Jonathan Barrow
af603f2295
fix: close rows when existing database functions 2024-04-09 14:28:04 -04:00
Jonathan Barrow
18e1a0fefa
chore: migrate ConnectedUser map to MutexMap 2024-04-09 12:21:50 -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
Jonathan Barrow
abb19ddf43
make 3DS friends display as online again 2023-11-16 16:24:06 -05: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
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
Daniel López Guimaraes
502035dc74
Replace return empty lists with nil 2023-08-15 21:35:33 +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
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
SuperMarioDaBom
db972eacc6 Adjust import names for consistency 2023-07-17 18:35:33 -07:00
SuperMarioDaBom
1b43935ea6 Update to latest version of libraries 2023-07-16 21:19:30 -07:00
Jonathan Barrow
2cce4a7af4
Updated to latest NEX libs 2023-04-08 10:44:51 -04:00
light
d90bd745d9 Merge branch 'feature-unfriendly-methods' of https://github.com/PretendoNetwork/friends-secure into feature-unfriendly-methods 2023-04-01 18:30:06 -04:00
light
9bfb3d2474 Add defaults to table and stop invalid blacklists 2023-04-01 18:30:02 -04:00
Jonathan Barrow
50e2ccecb8
Added 100 result limit to friendlist query for 3DS 2023-04-01 10:48:06 -04:00
light
b4ce1e275b Update database 2023-02-23 20:59:02 -05:00