Skip to content
This repository was archived by the owner on Feb 20, 2022. It is now read-only.

Commit b8be6f0

Browse files
author
Vincent Cantin
committed
Fix for making the library work on Meteor v1.4.1.2
This version of Meteor doesn't include the `username` field in its response. Trying to read it was triggering a null pointer error.
1 parent b939838 commit b8be6f0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

unity-project/Assets/unity3d-ddp-client/account/DdpAccount.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public class DdpAccount {
99
private DdpConnection connection;
1010

1111
public bool isLogged;
12-
public string username;
1312
public string userId;
1413
public string token;
1514
public DateTime tokenExpiration;
@@ -38,7 +37,6 @@ private void HandleLoginResult(MethodCall loginCall) {
3837
if (error == null) {
3938
JSONObject result = loginCall.result;
4039
isLogged = true;
41-
this.username = result["username"].str;
4240
this.userId = result["id"].str;
4341
this.token = result["token"].str;
4442
this.tokenExpiration = result["tokenExpires"].GetDateTime();
@@ -50,7 +48,6 @@ private void HandleLogoutResult(MethodCall logoutCall) {
5048

5149
if (error == null) {
5250
isLogged = false;
53-
this.username = null;
5451
this.userId = null;
5552
this.token = null;
5653
this.tokenExpiration = default(DateTime);

0 commit comments

Comments
 (0)