Skip to content

Commit

Permalink
App: Fix subscription events.
Browse files Browse the repository at this point in the history
Koi SDK bug.
  • Loading branch information
e3ndr committed Nov 12, 2024
1 parent e2773e7 commit 4057ea4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import co.casterlabs.koi.api.listener.KoiEventUtil;
import co.casterlabs.koi.api.listener.KoiLifeCycleHandler;
import co.casterlabs.koi.api.types.KoiEvent;
import co.casterlabs.koi.api.types.RoomId;
import co.casterlabs.koi.api.types.events.RoomstateEvent;
import co.casterlabs.koi.api.types.events.StreamStatusEvent;
import co.casterlabs.koi.api.types.events.UserUpdateEvent;
Expand Down Expand Up @@ -149,6 +150,7 @@ public void onSupportedFeatures(List<KoiIntegrationFeatures> features) {
// }
// }

@SuppressWarnings("deprecation")
@KoiEventHandler
public void onUserUpdate(UserUpdateEvent e) {
// boolean isAuthConfirmation = this.userData == null;
Expand All @@ -158,7 +160,7 @@ public void onUserUpdate(UserUpdateEvent e) {
if (this.roomstate == null) {
// TODO get rid of this by broadcasting roomstates across all platforms on
// connect. (KOI)
this.roomstate = RoomstateEvent.builder()
this.roomstate = RoomstateEvent.builder(RoomId.of(e.streamer.toSimpleProfile(), e.streamer.link))
.streamer(e.streamer.toSimpleProfile())
.timestamp(Instant.now())
.build();
Expand Down
2 changes: 1 addition & 1 deletion app/plugin_sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<dependency>
<groupId>co.casterlabs</groupId>
<artifactId>koi-sdk</artifactId>
<version>74d68f3</version>
<version>2dc74d3</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 4057ea4

Please sign in to comment.