File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Assets/Talo Game Services/Talo/Runtime Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,17 @@ public class CreateChannelOptions
4747 public bool temporaryMembership = false ;
4848 }
4949
50+ public enum ChannelLeavingReason
51+ {
52+ Default ,
53+ TemporaryMembership
54+ }
55+
5056 public class ChannelsAPI : BaseAPI
5157 {
5258 public event Action < Channel , PlayerAlias , string > OnMessageReceived ;
5359 public event Action < Channel , PlayerAlias > OnChannelJoined ;
54- public event Action < Channel , PlayerAlias > OnChannelLeft ;
60+ public event Action < Channel , PlayerAlias , ChannelLeavingReason > OnChannelLeft ;
5561 public event Action < Channel , PlayerAlias > OnOwnershipTransferred ;
5662 public event Action < Channel > OnChannelDeleted ;
5763 public event Action < Channel , string [ ] > OnChannelUpdated ;
@@ -73,7 +79,7 @@ public ChannelsAPI() : base("v1/game-channels")
7379 else if ( response . GetResponseType ( ) == "v1.channels.left" )
7480 {
7581 var data = response . GetData < ChannelLeftResponse > ( ) ;
76- OnChannelLeft ? . Invoke ( data . channel , data . playerAlias ) ;
82+ OnChannelLeft ? . Invoke ( data . channel , data . playerAlias , data . meta . reason ) ;
7783 }
7884 else if ( response . GetResponseType ( ) == "v1.channels.ownership-transferred" )
7985 {
Original file line number Diff line number Diff line change @@ -5,5 +5,12 @@ public class ChannelLeftResponse
55 {
66 public Channel channel ;
77 public PlayerAlias playerAlias ;
8+ public ChannelLeftResponseMetadata meta ;
9+ }
10+
11+ [ System . Serializable ]
12+ public class ChannelLeftResponseMetadata
13+ {
14+ public ChannelLeavingReason reason ;
815 }
916}
You can’t perform that action at this time.
0 commit comments