Ejemplo n.º 1
0
        public override async Task <EmptyResponse> RegisterPushNotifications(RegisterPushRequest request, ServerCallContext context)
        {
            var result = new EmptyResponse();

            var clientId = context.GetClientId();

            var clientInfo = await _clientAccountClient.ClientAccountInformation.GetByIdAsync(clientId);

            var sessionId = context.GetLykkeSessionId();

            await _pushNotificationsClient.FcmTokens.RegisterAsync(new FcmTokenModel
            {
                NotificationId = clientInfo.NotificationsId,
                ClientId       = clientId,
                SessionId      = sessionId,
                FcmToken       = request.FcmToken
            });

            return(result);
        }