diff --git a/.pubnub.yml b/.pubnub.yml index 28fe44b..481abec 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,6 +1,13 @@ --- -version: v1.1.0 +version: v1.1.1 changelog: + - date: 2025-11-06 + version: v1.1.1 + changes: + - type: feature + text: "Updated Unity SDK dependency to latest version - 9.3.0." + - type: bug + text: "Fixed an issue where sometimes the Active status for User would not have expected value." - date: 2025-10-29 version: v1.1.0 changes: diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChannelTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChannelTests.cs index e5aa3ce..62e40c4 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChannelTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChannelTests.cs @@ -119,7 +119,7 @@ public async Task TestLeaveChannel() Assert.IsNotNull(currentChatUser, "currentChatUser was null"); var channel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - channel.Join(); + await channel.Join(); await Task.Delay(3000); @@ -144,7 +144,7 @@ public async Task TestGetMessagesHistory() { TestUtils.AssertOperation(await message.EditMessageText("some_new_text")); }; - channel.Join(); + await channel.Join(); await Task.Delay(3500); TestUtils.AssertOperation(await channel.SendText("wololo")); @@ -163,7 +163,7 @@ public async Task TestGetMessagesHistory() public async Task TestGetMemberships() { var channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("get_members_test_channel")); - channel.Join(); + await channel.Join(); await Task.Delay(3500); var memberships = TestUtils.AssertOperation(await channel.GetMemberships()); Assert.That(memberships.Memberships.Count, Is.GreaterThanOrEqualTo(1)); @@ -173,7 +173,7 @@ public async Task TestGetMemberships() public async Task TestStartTyping() { var channel = TestUtils.AssertOperation(await chat.CreateDirectConversation(talkUser, "sttc")).CreatedChannel; - channel.Join(); + await channel.Join(); await Task.Delay(2500); channel.SetListeningForTyping(true); @@ -195,7 +195,7 @@ public async Task TestStartTyping() public async Task TestStopTyping() { var channel = TestUtils.AssertOperation(await chat.CreateDirectConversation(talkUser, "stop_typing_test_channel")).CreatedChannel; - channel.Join(); + await channel.Join(); await Task.Delay(2500); channel.SetListeningForTyping(true); await Task.Delay(2500); @@ -220,7 +220,7 @@ public async Task TestStopTyping() public async Task TestStopTypingFromTimer() { var channel = TestUtils.AssertOperation(await chat.CreateDirectConversation(talkUser, "stop_typing_timeout_test_channel")).CreatedChannel; - channel.Join(); + await channel.Join(); await Task.Delay(2500); channel.SetListeningForTyping(true); @@ -245,7 +245,7 @@ public async Task TestStopTypingFromTimer() public async Task TestPinMessage() { var channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("pin_message_test_channel_37")); - channel.Join(); + await channel.Join(); await Task.Delay(3500); var receivedManualEvent = new ManualResetEvent(false); @@ -273,7 +273,7 @@ public async Task TestPinMessage() public async Task TestUnPinMessage() { var channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("unpin_message_test_channel")); - channel.Join(); + await channel.Join(); await Task.Delay(3500); var receivedManualEvent = new ManualResetEvent(false); channel.OnMessageReceived += async message => @@ -317,7 +317,7 @@ public async Task TestCreateMessageDraft() public async Task TestEmitUserMention() { var channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("user_mention_test_channel")); - channel.Join(); + await channel.Join(); await Task.Delay(2500); var receivedManualEvent = new ManualResetEvent(false); user.SetListeningForMentionEvents(true); @@ -336,7 +336,7 @@ public async Task TestEmitUserMention() public async Task TestChannelIsPresent() { var someChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - someChannel.Join(); + await someChannel.Join(); await Task.Delay(4000); @@ -349,7 +349,7 @@ public async Task TestChannelIsPresent() public async Task TestChannelWhoIsPresent() { var someChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - someChannel.Join(); + await someChannel.Join(); await Task.Delay(4000); @@ -370,7 +370,7 @@ public async Task TestPresenceCallback() Assert.True(userIds.Contains(user.Id), "presence callback doesn't contain joined user id"); reset.Set(); }; - someChannel.Join(); + await someChannel.Join(); var presenceReceived = reset.WaitOne(12000); Assert.True(presenceReceived, "did not receive presence callback"); @@ -389,7 +389,7 @@ public async Task TestReportCallback() reset.Set(); }; - someChannel.Join(); + await someChannel.Join(); await Task.Delay(3000); someChannel.OnMessageReceived += async message => diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatEventTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatEventTests.cs index fce6b53..e003f8e 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatEventTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatEventTests.cs @@ -21,7 +21,7 @@ public async Task Setup() })); channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("event_tests_channel")); user = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatTests.cs index 7721ccf..6645431 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ChatTests.cs @@ -21,14 +21,14 @@ public async Task Setup() })); channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("chat_tests_channel_2")); currentUser = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } [TearDown] public async Task CleanUp() { - channel.Leave(); + await channel.Leave(); await Task.Delay(1000); chat.Destroy(); await Task.Delay(1000); @@ -140,7 +140,7 @@ public async Task TestForwardMessage() Assert.True(message.MessageText == "message_to_forward"); messageForwardReceivedManualEvent.Set(); }; - forwardingChannel.Join(); + await forwardingChannel.Join(); await Task.Delay(2500); channel.OnMessageReceived += async message => { await message.Forward(forwardingChannel.Id); }; @@ -192,23 +192,24 @@ public async Task TestGetUnreadMessagesCounts() public async Task TestMarkAllMessagesAsRead() { var markTestChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - markTestChannel.Join(); + await markTestChannel.Join(); - await Task.Delay(3000); + await Task.Delay(4000); await markTestChannel.SendText("wololo", new SendTextParams(){StoreInHistory = true}); - await Task.Delay(3000); + await Task.Delay(4000); - Assert.True(TestUtils.AssertOperation(await chat.GetUnreadMessagesCounts()).Any(x => x.ChannelId == markTestChannel.Id && x.Count > 0)); + var unread = TestUtils.AssertOperation(await chat.GetUnreadMessagesCounts(filter:$"channel.id LIKE \"{markTestChannel.Id}\"")); + Assert.True(unread.Any(x => x.ChannelId == markTestChannel.Id && x.Count > 0)); - TestUtils.AssertOperation(await chat.MarkAllMessagesAsRead()); + TestUtils.AssertOperation(await chat.MarkAllMessagesAsRead(filter:$"channel.id LIKE \"{markTestChannel.Id}\"")); - await Task.Delay(5000); + await Task.Delay(7000); var counts = TestUtils.AssertOperation(await chat.GetUnreadMessagesCounts()); - markTestChannel.Leave(); + await markTestChannel.Leave(); await markTestChannel.Delete(false); Assert.False(counts.Any(x => x.ChannelId == markTestChannel.Id && x.Count > 0)); @@ -224,7 +225,7 @@ public async Task TestReadReceipts() })); var otherChatChannel = TestUtils.AssertOperation(await otherChat.GetChannel(channel.Id)); - otherChatChannel.Join(); + await otherChatChannel.Join(); await Task.Delay(2500); otherChatChannel.SetListeningForReadReceiptsEvents(true); await Task.Delay(2500); @@ -243,7 +244,7 @@ public async Task TestReadReceipts() await Task.Delay(5000); - await chat.MarkAllMessagesAsRead(); + await chat.MarkAllMessagesAsRead(filter:$"channel.id LIKE \"{channel.Id}\""); var receipt = receiptReset.WaitOne(15000); Assert.True(receipt); } diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MembershipTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MembershipTests.cs index 309e162..fbd5c3a 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MembershipTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MembershipTests.cs @@ -21,7 +21,7 @@ public async Task Setup() })); channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("membership_tests_channel")); user = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } @@ -112,7 +112,7 @@ public async Task TestInviteMultiple() public async Task TestLastRead() { var testChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation("last_read_test_channel_57")); - testChannel.Join(); + await testChannel.Join(); await Task.Delay(4000); @@ -151,7 +151,7 @@ public async Task TestLastRead() public async Task TestUnreadMessagesCount() { var unreadChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation($"test_channel_{Guid.NewGuid()}")); - unreadChannel.Join(); + await unreadChannel.Join(); await Task.Delay(3500); diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageDraftTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageDraftTests.cs index 2265446..2029be6 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageDraftTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageDraftTests.cs @@ -23,7 +23,7 @@ public async Task Setup() { Name = "MessageDraftTestingChannel" })); - channel.Join(); + await channel.Join(); await Task.Delay(3000); dummyUser = await chat.GetOrCreateUser("mock_user", new ChatUserData() diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageTests.cs index 4270320..8f5bbca 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/MessageTests.cs @@ -21,7 +21,7 @@ public async Task Setup() })); channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("message_tests_channel_2")); user = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } @@ -55,7 +55,7 @@ public async Task TestReceivingMessageData() { var manualReceiveEvent = new ManualResetEvent(false); var testChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation("message_data_test_channel")); - testChannel.Join(); + await testChannel.Join(); await Task.Delay(2500); testChannel.OnMessageReceived += async message => { @@ -83,6 +83,9 @@ public async Task TestReceivingMessageData() var received = manualReceiveEvent.WaitOne(9000); Assert.IsTrue(received); + + //Cleanup + await testChannel.Delete(); } [Test] @@ -202,7 +205,7 @@ public async Task TestRestoreMessage() public async Task TestPinMessage() { var pinTestChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - pinTestChannel.Join(); + await pinTestChannel.Join(); await Task.Delay(2500); pinTestChannel.SetListeningForUpdates(true); await Task.Delay(3000); @@ -274,7 +277,7 @@ public async Task TestCreateThread() { message.SetListeningForUpdates(true); var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await Task.Delay(3500); await thread.SendText("thread_init_text"); await Task.Delay(5000); diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ThreadsTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ThreadsTests.cs index fb2bfe1..a3c80f3 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ThreadsTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/ThreadsTests.cs @@ -23,7 +23,7 @@ public async Task Setup() var randomId = Guid.NewGuid().ToString()[..10]; channel = TestUtils.AssertOperation(await chat.CreatePublicConversation(randomId)); user = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } @@ -45,7 +45,7 @@ public async Task TestGetThreadHistory() { message.SetListeningForUpdates(true); var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await Task.Delay(5000); @@ -72,7 +72,7 @@ public async Task TestThreadChannelParentChannelPinning() { message.SetListeningForUpdates(true); var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await thread.SendText("thread init message"); await Task.Delay(7000); @@ -105,7 +105,7 @@ public async Task TestThreadChannelEmitUserMention() channel.OnMessageReceived += async message => { var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await Task.Delay(2500); user.SetListeningForMentionEvents(true); await Task.Delay(2500); @@ -129,7 +129,7 @@ public async Task TestThreadMessageParentChannelPinning() { message.SetListeningForUpdates(true); var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await Task.Delay(3500); @@ -169,7 +169,7 @@ public async Task TestThreadMessageUpdate() { message.SetListeningForUpdates(true); var thread = TestUtils.AssertOperation(message.CreateThread()); - thread.Join(); + await thread.Join(); await Task.Delay(3000); diff --git a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/UserTests.cs b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/UserTests.cs index f538dd8..c4a9cc7 100644 --- a/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/UserTests.cs +++ b/c-sharp-chat/PubnubChatApi/PubNubChatApi.Tests/UserTests.cs @@ -21,14 +21,14 @@ public async Task Setup() })); channel = TestUtils.AssertOperation(await chat.CreatePublicConversation("user_tests_channel")); user = TestUtils.AssertOperation(await chat.GetCurrentUser()); - channel.Join(); + await channel.Join(); await Task.Delay(3500); } [TearDown] public async Task CleanUp() { - channel.Leave(); + await channel.Leave(); await Task.Delay(3000); chat.Destroy(); await Task.Delay(3000); @@ -37,14 +37,14 @@ public async Task CleanUp() [Test] public async Task TestUserActive() { - await Task.Delay(500); + await Task.Delay(1500); Assert.True(user.Active); } [Test] public async Task TestLastUserActive() { - await Task.Delay(500); + await Task.Delay(1500); var lastActive = user.LastActiveTimeStamp; Assert.False(string.IsNullOrEmpty(lastActive)); Assert.True(long.TryParse(lastActive, out var numberTimeStamp)); @@ -142,7 +142,7 @@ public async Task TestSoftDeleteAndRestoreUser() public async Task TestUserWherePresent() { var someChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - someChannel.Join(); + await someChannel.Join(); await Task.Delay(4000); @@ -155,7 +155,7 @@ public async Task TestUserWherePresent() public async Task TestUserIsPresentOn() { var someChannel = TestUtils.AssertOperation(await chat.CreatePublicConversation()); - someChannel.Join(); + await someChannel.Join(); await Task.Delay(4000); diff --git a/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs b/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs index 3f65ad7..90ee644 100644 --- a/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs +++ b/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs @@ -52,16 +52,16 @@ public class Chat public static async Task> CreateInstance(PubnubChatConfig chatConfig, PNConfiguration pubnubConfig, ChatListenerFactory? listenerFactory = null) { var chat = new Chat(chatConfig, pubnubConfig, listenerFactory); - if (chatConfig.StoreUserActivityTimestamp) - { - chat.StoreActivityTimeStamp(); - } var result = new ChatOperationResult("Chat.CreateInstance()", chat){Result = chat}; var getUser = await chat.GetCurrentUser().ConfigureAwait(false); if (getUser.Error) { result.RegisterOperation(await chat.CreateUser(chat.PubnubInstance.GetCurrentUserId()).ConfigureAwait(false)); } + if (chatConfig.StoreUserActivityTimestamp) + { + chat.StoreActivityTimeStamp(); + } return result; } @@ -81,16 +81,16 @@ public static async Task> CreateInstance(PubnubChatCon public static async Task> CreateInstance(PubnubChatConfig chatConfig, Pubnub pubnub, ChatListenerFactory? listenerFactory = null) { var chat = new Chat(chatConfig, pubnub, listenerFactory); - if (chatConfig.StoreUserActivityTimestamp) - { - chat.StoreActivityTimeStamp(); - } var result = new ChatOperationResult("Chat.CreateInstance()", chat){Result = chat}; var getUser = await chat.GetCurrentUser().ConfigureAwait(false); if (getUser.Error) { result.RegisterOperation(await chat.CreateUser(chat.PubnubInstance.GetCurrentUserId()).ConfigureAwait(false)); } + if (chatConfig.StoreUserActivityTimestamp) + { + chat.StoreActivityTimeStamp(); + } return result; } @@ -586,6 +586,7 @@ public async Task DeleteChannel(string channelId, bool soft internal async void StoreActivityTimeStamp() { var currentUserId = PubnubInstance.GetCurrentUserId(); + storeActivity = true; while (storeActivity) { var getResult = await User.GetUserData(this, currentUserId).ConfigureAwait(false); diff --git a/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/User.cs b/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/User.cs index f3b84af..7f1c67c 100644 --- a/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/User.cs +++ b/c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/User.cs @@ -81,7 +81,7 @@ public bool Active return false; } var currentTimeStamp = ChatUtils.TimeTokenNowLong(); - var interval = chat.Config.StoreUserActivityInterval; + var interval = (long)chat.Config.StoreUserActivityInterval; var lastActive = Convert.ToInt64(lastActiveTimestamp); return currentTimeStamp - lastActive <= interval * 1000000; } diff --git a/c-sharp-chat/PubnubChatApi/PubnubChatApi/PubnubChatApi.csproj b/c-sharp-chat/PubnubChatApi/PubnubChatApi/PubnubChatApi.csproj index 86d783e..74420a6 100644 --- a/c-sharp-chat/PubnubChatApi/PubnubChatApi/PubnubChatApi.csproj +++ b/c-sharp-chat/PubnubChatApi/PubnubChatApi/PubnubChatApi.csproj @@ -14,7 +14,7 @@ - + diff --git a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/Chat.cs b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/Chat.cs index 3f65ad7..90ee644 100644 --- a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/Chat.cs +++ b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/Chat.cs @@ -52,16 +52,16 @@ public class Chat public static async Task> CreateInstance(PubnubChatConfig chatConfig, PNConfiguration pubnubConfig, ChatListenerFactory? listenerFactory = null) { var chat = new Chat(chatConfig, pubnubConfig, listenerFactory); - if (chatConfig.StoreUserActivityTimestamp) - { - chat.StoreActivityTimeStamp(); - } var result = new ChatOperationResult("Chat.CreateInstance()", chat){Result = chat}; var getUser = await chat.GetCurrentUser().ConfigureAwait(false); if (getUser.Error) { result.RegisterOperation(await chat.CreateUser(chat.PubnubInstance.GetCurrentUserId()).ConfigureAwait(false)); } + if (chatConfig.StoreUserActivityTimestamp) + { + chat.StoreActivityTimeStamp(); + } return result; } @@ -81,16 +81,16 @@ public static async Task> CreateInstance(PubnubChatCon public static async Task> CreateInstance(PubnubChatConfig chatConfig, Pubnub pubnub, ChatListenerFactory? listenerFactory = null) { var chat = new Chat(chatConfig, pubnub, listenerFactory); - if (chatConfig.StoreUserActivityTimestamp) - { - chat.StoreActivityTimeStamp(); - } var result = new ChatOperationResult("Chat.CreateInstance()", chat){Result = chat}; var getUser = await chat.GetCurrentUser().ConfigureAwait(false); if (getUser.Error) { result.RegisterOperation(await chat.CreateUser(chat.PubnubInstance.GetCurrentUserId()).ConfigureAwait(false)); } + if (chatConfig.StoreUserActivityTimestamp) + { + chat.StoreActivityTimeStamp(); + } return result; } @@ -586,6 +586,7 @@ public async Task DeleteChannel(string channelId, bool soft internal async void StoreActivityTimeStamp() { var currentUserId = PubnubInstance.GetCurrentUserId(); + storeActivity = true; while (storeActivity) { var getResult = await User.GetUserData(this, currentUserId).ConfigureAwait(false); diff --git a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/User.cs b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/User.cs index f3b84af..7f1c67c 100644 --- a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/User.cs +++ b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/PubnubChatApi/Entities/User.cs @@ -81,7 +81,7 @@ public bool Active return false; } var currentTimeStamp = ChatUtils.TimeTokenNowLong(); - var interval = chat.Config.StoreUserActivityInterval; + var interval = (long)chat.Config.StoreUserActivityInterval; var lastActive = Convert.ToInt64(lastActiveTimestamp); return currentTimeStamp - lastActive <= interval * 1000000; } diff --git a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/UnityChatPNSDKSource.cs b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/UnityChatPNSDKSource.cs index 68bdc08..a7e311d 100644 --- a/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/UnityChatPNSDKSource.cs +++ b/unity-chat/PubnubChatUnity/Assets/PubnubChat/Runtime/UnityChatPNSDKSource.cs @@ -5,7 +5,7 @@ namespace PubnubChatApi { public class UnityChatPNSDKSource : IPNSDKSource { - private const string build = "1.1.0"; + private const string build = "1.1.1"; private string GetPlatformString() { diff --git a/unity-chat/PubnubChatUnity/Assets/PubnubChat/package.json b/unity-chat/PubnubChatUnity/Assets/PubnubChat/package.json index 30e2579..01b6f96 100644 --- a/unity-chat/PubnubChatUnity/Assets/PubnubChat/package.json +++ b/unity-chat/PubnubChatUnity/Assets/PubnubChat/package.json @@ -1,6 +1,6 @@ { "name": "com.pubnub.pubnubchat", - "version": "1.1.0", + "version": "1.1.1", "displayName": "Pubnub Chat", "description": "PubNub Unity Chat SDK", "unity": "2022.3", @@ -25,7 +25,7 @@ } ], "dependencies": { - "com.pubnub.sdk": "9.2.0" + "com.pubnub.sdk": "9.3.0" }, "repository": "https://github.com/pubnub/unity-chat" } \ No newline at end of file diff --git a/unity-chat/PubnubChatUnity/Packages/packages-lock.json b/unity-chat/PubnubChatUnity/Packages/packages-lock.json index ba0ef82..0c2075a 100644 --- a/unity-chat/PubnubChatUnity/Packages/packages-lock.json +++ b/unity-chat/PubnubChatUnity/Packages/packages-lock.json @@ -7,7 +7,7 @@ "dependencies": { "com.unity.nuget.newtonsoft-json": "3.0.2" }, - "hash": "841822252c4f8c932961a3386cd55610b749e319" + "hash": "71217ab68a9640cb50b2ed2d3fed0b992d83d90f" }, "com.unity.collab-proxy": { "version": "2.6.0",