From 935ff900fabc2261f909b63a5a5cafe6bad12791 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 16 Sep 2024 11:18:23 +0530 Subject: [PATCH] Added attachOnSubscribe option to ChannelOptions --- lib/src/main/java/io/ably/lib/types/ChannelOptions.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/main/java/io/ably/lib/types/ChannelOptions.java b/lib/src/main/java/io/ably/lib/types/ChannelOptions.java index 29186eee9..725425203 100644 --- a/lib/src/main/java/io/ably/lib/types/ChannelOptions.java +++ b/lib/src/main/java/io/ably/lib/types/ChannelOptions.java @@ -40,6 +40,13 @@ public class ChannelOptions { */ public boolean encrypted; + /** + * Determines whether calling @subscribe@ on a channel or presence object should trigger an implicit attach. + * Defaults to @true@. + * Spec: RTP6d, RTP6e, TB4 + */ + public boolean attachOnSubscribe = true; + public boolean hasModes() { return null != modes && 0 != modes.length; }