Update application data in gRPC notification

This commit is contained in:
light 2023-07-06 00:07:22 -04:00
parent 51a8716530
commit d5f4e393ed
No known key found for this signature in database
GPG Key ID: BC243C5917AF7533
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package grpc
import (
"bytes"
"context"
"encoding/binary"
"log"
@ -25,14 +24,13 @@ func SendIncomingCallNotification(caller uint32, target uint32) {
presence.GameKey = friends_wiiu_types.NewGameKey()
presence.Unknown2 = 0x65
presence.GameServerID = 0x1005A000
presence.PID = 4 // This is not a PID.
presence.PID = 1 // This is not a PID, but the amount of times the PID is repeated in bytes in the application data.
presence.GatheringID = caller
// The application data here is the PID, repeated 4 times. Why, you ask? Who knows!
targetBytes := make([]byte, 4)
binary.BigEndian.PutUint32(targetBytes, target)
presence.ApplicationData = bytes.Repeat(targetBytes, 4)
presence.ApplicationData = targetBytes
presence.GameKey.TitleID = 0x000500101005A100
presence.GameKey.TitleVersion = 55

View File

@ -1,8 +1,6 @@
package nex_matchmake_extension
import (
"log"
nex "github.com/PretendoNetwork/nex-go"
"github.com/PretendoNetwork/wiiu-chat-secure/database"
"github.com/PretendoNetwork/wiiu-chat-secure/globals"
@ -14,7 +12,7 @@ import (
)
func UpdateNotificationData(err error, client *nex.Client, callID uint32, uiType uint32, uiParam1 uint32, uiParam2 uint32, strParam string) {
log.Printf("uiType: %d, uiParam1: %d, uiParam2: %d, strParam: %s\r\n", uiType, uiParam1, uiParam2, strParam)
globals.Logger.Infof("uiType: %d, uiParam1: %d, uiParam2: %d, strParam: %s\r\n", uiType, uiParam1, uiParam2, strParam)
recipientClient := globals.NEXServer.FindClientFromPID(uiParam2)
if uiType == notifications.NotificationCategories.RequestJoinGathering {