Skip to content

Commit

Permalink
release-v4.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
OnestarLee committed Mar 6, 2024
1 parent 9c32bf8 commit 0c822d8
Show file tree
Hide file tree
Showing 95 changed files with 235 additions and 254 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 4.0.0-beta.2 (Mar 7, 2024)
### Improvements
- Changed the JSON library from a binary to a dependency form
- Added Support for Unity2019.4
- Added Support for .NET 4.x

## 4.0.0-beta.1 (Sep 15, 2023)
### Improvements
- Fixed the bug regarding the URL encoding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void OnTranslateUserMessageCompletionHandler(ApiCommandAbstract.Response inRespo

private SbPreviousMessageListQuery CreatePreviousMessageListQueryInternal(SbPreviousMessageListQueryParams inParams = null)
{
inParams ??= new SbPreviousMessageListQueryParams();
if (inParams == null)
inParams = new SbPreviousMessageListQueryParams();

return new SbPreviousMessageListQuery(ChannelType, _url, inParams, chatMainContextRef);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@ void OnCompletionHandler(ApiCommandAbstract.Response inResponse, SbError inError

private SbBannedUserListQuery CreateBannedUserListQueryInternal(SbBannedUserListQueryParams inParams = null)
{
inParams ??= new SbBannedUserListQueryParams();
if (inParams == null)
inParams = new SbBannedUserListQueryParams();

return new SbBannedUserListQuery(ChannelType, _url, inParams, chatMainContextRef);
}

private SbMutedUserListQuery CreateMutedUserListQueryInternal(SbMutedUserListQueryParams inParams = null)
{
inParams ??= new SbMutedUserListQueryParams();
if (inParams == null)
inParams = new SbMutedUserListQueryParams();

return new SbMutedUserListQuery(ChannelType, _url, inParams, chatMainContextRef);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ void OnCompletionHandler(ApiCommandAbstract.Response inResponse, SbError inError

private SbOperatorListQuery CreateOperatorListQueryInternal(SbOperatorListQueryParams inParams = null)
{
inParams ??= new SbOperatorListQueryParams();
if (inParams == null)
inParams = new SbOperatorListQueryParams();

return new SbOperatorListQuery(ChannelType, _url, inParams, chatMainContextRef);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal void Initialize(SbInitParams inInitParams)
{
if (_isTerminated == false)
Terminate();

ChatMainContext.Initialize(SendbirdChatMainContext.SDK_VERSION, SendbirdChatMainContext.PLATFORM_NAME, SendbirdChatMainContext.PLATFORM_VERSION,
SendbirdChatMainContext.OS_NAME, SendbirdChatMainContext.OS_VERSION, inInitParams.ApplicationId, inInitParams.AppVersion);

Expand Down Expand Up @@ -128,19 +128,25 @@ internal void SetSessionHandler(SbSessionHandler inSessionHandler)

internal SbApplicationUserListQuery CreateApplicationUserListQuery(SbApplicationUserListQueryParams inParams = null)
{
inParams ??= new SbApplicationUserListQueryParams();
if (inParams == null)
inParams = new SbApplicationUserListQueryParams();

return new SbApplicationUserListQuery(inParams, ChatMainContext);
}

internal SbBlockedUserListQuery CreateBlockedUserListQuery(SbBlockedUserListQueryParams inParams = null)
{
inParams ??= new SbBlockedUserListQueryParams();
if (inParams == null)
inParams = new SbBlockedUserListQueryParams();

return new SbBlockedUserListQuery(inParams, ChatMainContext);
}

public SbMessageSearchQuery CreateMessageSearchQuery(SbMessageSearchQueryParams inParams = null)
{
inParams ??= new SbMessageSearchQueryParams();
if (inParams == null)
inParams = new SbMessageSearchQueryParams();

return new SbMessageSearchQuery(inParams, ChatMainContext);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -15,7 +15,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
{
internal Request(string inToken, int inLimit, SbChannelType inChannelType, string inChannelUrl, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(inChannelType)}/{inChannelUrl}/ban";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;
using System.Net;

namespace Sendbird.Chat
{
Expand All @@ -12,7 +12,7 @@ internal sealed class Request : ApiCommandAbstract.DeleteRequest
{
internal Request(string inChannelUrl, SbChannelType inChannelType, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(inChannelType)}/{inChannelUrl}";
resultHandler = inResultHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;

namespace Sendbird.Chat
{
Expand All @@ -13,7 +13,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
{
internal Request(string inChannelUrl, bool inIsInternal, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group, inIsInternal)}/{inChannelUrl}";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

Expand Down Expand Up @@ -32,7 +32,7 @@ internal struct Params

internal Request(Params inParams, ResultHandler inResultHandler)
{
inParams.channelUrl = HttpUtility.UrlEncode(inParams.channelUrl);
inParams.channelUrl = WebUtility.UrlEncode(inParams.channelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inParams.channelUrl}/messages_gap";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -15,7 +15,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
{
internal Request(string inUserId, string inToken, long? inTimestamp, SbGroupChannelChangeLogsParams inParams, int inLimit, ResultHandler inResultHandler)
{
inUserId = HttpUtility.UrlEncode(inUserId);
inUserId = WebUtility.UrlEncode(inUserId);
Url = $"{USERS_PREFIX_URL}/{inUserId}/my_group_channels/changelogs";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -21,7 +21,7 @@ internal Request(string inToken, int inLimit, string inChannelUrl,
SbMemberListOrder inOrder,
ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/members";

ResponseType = typeof(Response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inChannelUrl, string inUserId, bool inHidePreviousMessages, bool inAllowAutoUnhide, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/hide";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;
using System.Net;

namespace Sendbird.Chat
{
Expand All @@ -12,7 +12,7 @@ internal sealed class Request : ApiCommandAbstract.DeleteRequest
{
internal Request(string inChannelUrl, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/hide";
resultHandler = inResultHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -23,7 +23,7 @@ private struct Payload

internal Request(string inChannelUrl, string inUserId, string inAccessCode, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/accept";
resultHandler = inResultHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -22,7 +22,7 @@ private struct Payload

internal Request(string inChannelUrl, string inUserId, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/decline";
resultHandler = inResultHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inChannelUrl, List<string> inUserIds, string inInviterId, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/invite";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inChannelUrl, string inUserId, string inAccessCode, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/join";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inChannelUrl, string inUserId, bool inShouldRemoveOperatorStatus, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/leave";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inChannelUrl, long inMessageId, string inSessionKey, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/messages/mark_as_delivered";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -24,7 +24,7 @@ private struct Payload

internal Request(string inUserId, List<string> inChannelUrls, ResultHandler inResultHandler)
{
inUserId = HttpUtility.UrlEncode(inUserId);
inUserId = WebUtility.UrlEncode(inUserId);
Url = $"{USERS_PREFIX_URL}/{inUserId}/mark_as_read_all";
resultHandler = inResultHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

using System;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand All @@ -22,7 +22,7 @@ private struct Payload

internal Request(string inChannelUrl, bool inFreeze, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
inChannelUrl = WebUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(SbChannelType.Group)}/{inChannelUrl}/freeze";

resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Net;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand Down Expand Up @@ -48,7 +48,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
private const string INCLUDE_CHAT_NOTIFICATION = "include_chat_notification";
internal Request(string inUserId, string inToken, SbGroupChannelListQuery inQuery, ResultHandler inResultHandler)
{
inUserId = HttpUtility.UrlEncode(inUserId);
inUserId = WebUtility.UrlEncode(inUserId);
Url = $"{USERS_PREFIX_URL}/{inUserId}/my_group_channels";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Loading

0 comments on commit 0c822d8

Please sign in to comment.