Clarify Priority calling order

Altered pre-connection logic to make reason settable
Optionally cancel connection if recorder is used and fails to find record url!
This commit is contained in:
kohlerpop1
2025-02-19 13:18:25 -05:00
parent 28ef3562b6
commit 735bdfbb10
6 changed files with 61 additions and 11 deletions

View File

@@ -140,7 +140,7 @@ public class TikTokLiveClient implements LiveClient
var preconnectEvent = new TikTokPreConnectionEvent(userData, liveData);
tikTokEventHandler.publish(this, preconnectEvent);
if (preconnectEvent.isCancelConnection())
throw new TikTokLiveException("TikTokPreConnectionEvent cancelled connection!");
throw new TikTokLivePreConnectionException(preconnectEvent);
if (clientSettings.isFetchGifts())
giftManager.attachGiftsList(httpClient.fetchRoomGiftsData(userData.getRoomId()).getGifts());