Skip to content
Open
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
2 changes: 1 addition & 1 deletion AgoraChatSDK/AgoraChat/SDKClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal MessageManager MessageManager
* \~english
* The SDK version.
*/
public string SdkVersion { get => "1.4.0"; }
public string SdkVersion { get => "1.4.2"; }


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public static EMOptions fromJson(JSONObject json, Context context) throws JSONEx
if (json.has("deviceName")) {
options.setCustomDeviceName(json.optString("deviceName"));
}
if (json.has("osType")) {
options.setCustomOSPlatform(json.optInt("osType"));
if (json.has("customOSType")) {
options.setCustomOSPlatform(json.optInt("customOSType"));
}
if (json.has("regardImportMsgAsRead")) {
options.setRegardImportedMsgAsRead(json.optBoolean("regardImportMsgAsRead"));
Expand Down
20 changes: 10 additions & 10 deletions AgoraChatSDK/CWrapper/Wrapper/Wrapper_Common/sdk_wrapper/models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,13 @@ namespace sdk_wrapper
configs->setUseReplacedMessageContents(use_replaced_message_contents);
}

bool os_custom_set = false;
if (jnode.HasMember("customOSType") && jnode["customOSType"].IsInt()) {
int custom_os_type = jnode["customOSType"].GetInt();
if (-1 != custom_os_type) {
configs->setOs(EMChatConfigs::OSType::OS_CUSTOM);
configs->setOSCustomValue(custom_os_type);
os_custom_set = true;
}
}

Expand All @@ -484,7 +486,9 @@ namespace sdk_wrapper
//TODO: need to Area code later

#ifndef _WIN32
configs->setOs(EMChatConfigs::OS_OSX);
if (!os_custom_set) {
configs->setOs(EMChatConfigs::OS_OSX);
}

string uuid = GetMacUuid();
if (uuid.size() > 0)
Expand All @@ -494,7 +498,9 @@ namespace sdk_wrapper
if (did.size() > 0)
configs->setDid(did);
#else
configs->setOs(EMChatConfigs::OS_MSWIN);
if (!os_custom_set) {
configs->setOs(EMChatConfigs::OS_MSWIN);
}

string did = GetWinDid(false);
if (did.size() > 0)
Expand Down Expand Up @@ -2433,18 +2439,12 @@ namespace sdk_wrapper

void Group::ToJsonObject(Writer<StringBuffer>& writer, const EMMucMuteList& vec)
{
writer.StartArray();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里相当于把输出从数组结构改成了map结构,确定没有问题吗

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是从agora 1.4.0 版本合并到new分支后遇到的冲突,然后根据现在对外的结构修改的。这个得测试。

for (const auto& it : vec)
{
writer.String(it.first.c_str());
}
writer.EndArray();
/*writer.StartObject();
writer.StartObject();
for (int i = 0; i < vec.size(); i++) {
writer.Key(vec[i].first.c_str());
writer.Int64(vec[i].second);
}
writer.EndObject();*/
writer.EndObject();
}

void Group::ToJsonObjectWithGroupInfo(Writer<StringBuffer>& writer, EMGroupPtr group)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ - (NSDictionary *)toJson {
data[@"dnsUrl"] = self.dnsURL;
data[@"areaCode"] = @(self.area);
data[@"enableEmptyConversation"] = @(self.loadEmptyConversations);
data[@"osType"] = @(self.customOSType);
data[@"customOSType"] = @(self.customOSType);
data[@"deviceName"] = self.customDeviceName;
data[@"useReplacedMessageContents"] = @(self.useReplacedMessageContents);
data[@"regardImportMsgAsRead"] = @(self.regardImportMessagesAsRead);
Expand Down Expand Up @@ -86,8 +86,8 @@ + (EMOptions *)fromJson:(NSDictionary *)aJson {
options.loadEmptyConversations = [aJson[@"enableEmptyConversation"] boolValue];
}
options.customDeviceName = aJson[@"deviceName"];
if(aJson[@"osType"]) {
options.customOSType = [aJson[@"osType"] intValue];
if(aJson[@"customOSType"]) {
options.customOSType = [aJson[@"customOSType"] intValue];
}

if(aJson[@"useReplacedMessageContents"]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using AgoraChat.SimpleJSON;
#if !_WIN32
Expand Down
2 changes: 1 addition & 1 deletion UnityChatDemo/Assets/AgoraChat/AgoraChat/Models/Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ internal override JSONObject ToJsonObject()
return jo;
}
}
}
}
2 changes: 1 addition & 1 deletion UnityChatDemo/Assets/AgoraChat/AgoraChat/SDKClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal MessageManager MessageManager
* \~english
* The SDK version.
*/
public string SdkVersion { get => "1.4.0"; }
public string SdkVersion { get => "1.4.2"; }


/**
Expand Down