jwdeveloper/TikTokLiveJava

client.getRoomInfo().getHostUser() always returning null

SteveNunes opened this issue · 2 comments

Returning null even through onRoomInfo() event.

TikTokRoomInfo(roomId=7303510337083558687, likesCount=1946326, viewersCount=357, totalViewersCount=154502, ageRestricted=false, host=io.github.jwdeveloper.tiktok.data.models.users.User@74995531, usersRanking=[RankingUser(rank=1, user=io.github.jwdeveloper.tiktok.data.models.users.User@78d08cc, score=550), RankingUser(rank=2, user=io.github.jwdeveloper.tiktok.data.models.users.User@18d2e394, score=330)], hostName=jkbnjs2001, title=Game, language=en, connectionState=CONNECTED) -> null

Code:

.onRoomInfo((liveClient, event) -> {
    System.out.println(event.getRoomInfo() + " -> " +
        (event.getRoomInfo().getHostUser() == null ? null : event.getRoomInfo().getHostUser()));
})

Returning null even through onRoomInfo() event.

TikTokRoomInfo(roomId=7303510337083558687, likesCount=1946326, viewersCount=357, totalViewersCount=154502, ageRestricted=false, host=io.github.jwdeveloper.tiktok.data.models.users.User@74995531, usersRanking=[RankingUser(rank=1, user=io.github.jwdeveloper.tiktok.data.models.users.User@78d08cc, score=550), RankingUser(rank=2, user=io.github.jwdeveloper.tiktok.data.models.users.User@18d2e394, score=330)], hostName=jkbnjs2001, title=Game, language=en, connectionState=CONNECTED) -> null

Code:

.onRoomInfo((liveClient, event) -> {
    System.out.println(event.getRoomInfo() + " -> " +
        (event.getRoomInfo().getHostUser() == null ? null : event.getRoomInfo().getHostUser()));
})

I spoke to JW about this. It was actually a bug and has been updated so it returns the actual host user. It should be fixed on next release!

Fixed