diff --git a/Project/App.xojo_code b/Project/App.xojo_code index 2970661b9..4199ea1f8 100755 --- a/Project/App.xojo_code +++ b/Project/App.xojo_code @@ -1199,6 +1199,7 @@ Implements NotificationKit.Receiver,Beacon.Application Self.mPusher = New Beacon.PusherSocket If (Self.mIdentityManager Is Nil) = False And Self.mIdentityManager.CurrentUserId.IsEmpty = False Then Self.mPusher.Start() + Self.SubscribeToPusherPublic() End If Self.NextLaunchQueueTask End Sub @@ -1424,6 +1425,7 @@ Implements NotificationKit.Receiver,Beacon.Application Var UserId As String = Self.mIdentityManager.CurrentUserId If UserId.IsEmpty = False Then Self.mPusher.Start() + Self.SubscribeToPusherPublic() Var UserChannelName As String = Beacon.PusherSocket.UserChannelName(UserId) Self.mPusher.Listen(UserChannelName, "user-updated", AddressOf Pusher_UserUpdated) Self.mPusher.Listen(UserChannelName, "cloud-updated", AddressOf Pusher_CloudUpdated) @@ -1544,6 +1546,16 @@ Implements NotificationKit.Receiver,Beacon.Application End Sub #tag EndMethod + #tag Method, Flags = &h21 + Private Sub Pusher_UpdateBlueprints(ChannelName As String, EventName As String, Payload As String) + #Pragma Unused ChannelName + #Pragma Unused EventName + #Pragma Unused Payload + + Self.SyncGamedata(True, False) + End Sub + #tag EndMethod + #tag Method, Flags = &h21 Private Sub Pusher_UserUpdated(ChannelName As String, EventName As String, Payload As String) #Pragma Unused ChannelName @@ -1646,6 +1658,13 @@ Implements NotificationKit.Receiver,Beacon.Application End Sub #tag EndMethod + #tag Method, Flags = &h21 + Private Sub SubscribeToPusherPublic() + Self.mPusher.Subscribe("beacon-public") + Self.mPusher.Listen("beacon-public", "update-blueprints", AddressOf Pusher_UpdateBlueprints) + End Sub + #tag EndMethod + #tag Method, Flags = &h0 Sub SyncGamedata(Silent As Boolean, ForceRefresh As Boolean) If Silent Then