Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log

## 4.0.0-beta (Aug 25, 2023)
## 4.0.0-beta.1 (Sep 15, 2023)
### Improvements
- Fixed the bug regarding the URL encoding

## 4.0.0-beta (Aug 25, 2023)
### Features
- Group channel collection
- Message collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace Sendbird.Chat
{
internal class SendbirdChatMainContext
{
internal const string SDK_VERSION = "4.0.0-beta";
internal const string SDK_VERSION = "4.0.0-beta.1";
internal const string PLATFORM_NAME = "Unity";
internal static readonly string PLATFORM_VERSION = UnityEngine.Application.version;
internal static readonly string OS_NAME = UnityEngine.Application.platform.ToString();
internal static readonly string PLATFORM_VERSION = Application.version;
internal static readonly string OS_NAME = Application.platform.ToString();
internal static readonly string OS_VERSION = SystemInfo.operatingSystem;
internal const int QUERY_DEFAULT_LIMIT = 20;
internal string SdkVersion { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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

namespace Sendbird.Chat
Expand All @@ -14,6 +15,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
{
internal Request(string inToken, int inLimit, SbChannelType inChannelType, string inChannelUrl, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +2,8 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;

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

using System;
using System.Web;

namespace Sendbird.Chat
{
Expand All @@ -12,6 +13,7 @@ internal sealed class Request : ApiCommandAbstract.GetRequest
{
internal Request(string inChannelUrl, bool inIsInternal, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +4,7 @@

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

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

internal Request(Params inParams, ResultHandler inResultHandler)
{
inParams.channelUrl = HttpUtility.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,6 +4,7 @@

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

namespace Sendbird.Chat
Expand All @@ -14,6 +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);
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,6 +4,7 @@

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

namespace Sendbird.Chat
Expand All @@ -20,6 +21,7 @@ internal Request(string inToken, int inLimit, string inChannelUrl,
SbMemberListOrder inOrder,
ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, string inUserId, bool inHidePreviousMessages, bool inAllowAutoUnhide, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +2,8 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;

namespace Sendbird.Chat
{
internal sealed class UnhideGroupChannelApiCommand
Expand All @@ -10,6 +12,7 @@ internal sealed class Request : ApiCommandAbstract.DeleteRequest
{
internal Request(string inChannelUrl, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, string inUserId, string inAccessCode, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, string inUserId, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +4,7 @@

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

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

internal Request(string inChannelUrl, List<string> inUserIds, string inInviterId, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, string inUserId, string inAccessCode, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, string inUserId, bool inShouldRemoveOperatorStatus, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, long inMessageId, string inSessionKey, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +4,7 @@

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

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

internal Request(string inUserId, List<string> inChannelUrls, ResultHandler inResultHandler)
{
inUserId = HttpUtility.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,6 +3,7 @@
//

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

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

internal Request(string inChannelUrl, bool inFreeze, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.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,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using Newtonsoft.Json;

namespace Sendbird.Chat
Expand Down Expand Up @@ -47,6 +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);
Url = $"{USERS_PREFIX_URL}/{inUserId}/my_group_channels";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;

namespace Sendbird.Chat
{
internal sealed class PinMessageApiCommand
Expand All @@ -10,6 +12,7 @@ internal sealed class Request : ApiCommandAbstract.PostRequest
{
internal Request(string inChannelUrl, SbChannelType inChannelType, long inMessageId, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(inChannelType)}/{inChannelUrl}/messages/{inMessageId}/pin";
resultHandler = inResultHandler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright (c) 2022 Sendbird, Inc.
//

using System.Web;

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

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

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

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

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

namespace Sendbird.Chat
Expand Down Expand Up @@ -45,6 +46,7 @@ private struct Payload

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

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

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

internal Request(string inChannelUrl, SbChannelType inChannelType, Dictionary<string, int> inMetaCounters, ResultHandler inResultHandler)
{
inChannelUrl = HttpUtility.UrlEncode(inChannelUrl);
Url = $"{ChannelTypeToUrlPrefix(inChannelType)}/{inChannelUrl}/metacounter";
ResponseType = typeof(Response);
resultHandler = inResultHandler;
Expand Down
Loading