Compare commits

...

2 Commits

Author SHA1 Message Date
kohlerpop1
ffde21afac Only copy roomInfo if its valid and null check safety! 2025-09-17 18:54:14 -04:00
GitHub Action
aa1ef1f170 Update version in pom.xml 2025-09-17 01:49:13 +00:00
9 changed files with 10 additions and 8 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>API</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -124,7 +124,6 @@ public class TikTokLiveClient implements LiveClient
tikTokEventHandler.publish(this, new TikTokConnectingEvent());
var userDataRequest = new LiveUserData.Request(roomInfo.getHostName());
var userData = httpClient.fetchLiveUserData(userDataRequest);
roomInfo.copy(userData.getRoomInfo());
if (userData.getUserStatus() == LiveUserData.UserStatus.Offline)
throw new TikTokLiveOfflineHostException("User is offline: " + roomInfo.getHostName(), userData, null);
@@ -132,6 +131,8 @@ public class TikTokLiveClient implements LiveClient
if (userData.getUserStatus() == LiveUserData.UserStatus.NotFound)
throw new TikTokLiveUnknownHostException("User not found: " + roomInfo.getHostName(), userData, null);
roomInfo.copy(userData.getRoomInfo());
var liveDataRequest = new LiveData.Request(userData.getRoomInfo().getRoomId());
var liveData = httpClient.fetchLiveData(liveDataRequest);

View File

@@ -58,6 +58,7 @@ public class TikTokRoomInfo implements LiveRoomInfo
@Override
public void copy(LiveRoomInfo roomInfo) {
if (roomInfo == null) return;
this.roomId = roomInfo.getRoomId();
this.likesCount = roomInfo.getLikesCount();
this.viewersCount = roomInfo.getViewersCount();

View File

@@ -41,7 +41,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<artifactId>TikTokLiveJava</artifactId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>extension-recorder</artifactId>

View File

@@ -7,7 +7,7 @@
<groupId>io.github.jwdeveloper.tiktok</groupId>
<artifactId>TikTokLiveJava</artifactId>
<packaging>pom</packaging>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
<modules>
<module>API</module>
<module>Client</module>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.10.10-Release</version>
<version>1.11.0-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>