fix: 修复设置对话名称无效的 bug
parent
d2cdb7bd69
commit
6d3064e29d
|
@ -43,18 +43,21 @@ namespace LeanCloud.Realtime.Internal.Controller {
|
||||||
if (members != null) {
|
if (members != null) {
|
||||||
conv.M.AddRange(members);
|
conv.M.AddRange(members);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(name)) {
|
|
||||||
conv.N = name;
|
|
||||||
}
|
|
||||||
if (temporary) {
|
if (temporary) {
|
||||||
conv.TempConv = temporary;
|
conv.TempConv = temporary;
|
||||||
conv.TempConvTTL = temporaryTtl;
|
conv.TempConvTTL = temporaryTtl;
|
||||||
}
|
}
|
||||||
if (properties != null) {
|
Dictionary<string, object> attrs = new Dictionary<string, object>();
|
||||||
conv.Attr = new JsonObjectMessage {
|
if (!string.IsNullOrEmpty(name)) {
|
||||||
Data = JsonConvert.SerializeObject(LCEncoder.Encode(properties))
|
attrs["name"] = name;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
if (properties != null) {
|
||||||
|
attrs = properties.Union(attrs)
|
||||||
|
.ToDictionary(k => k.Key, v => v.Value);
|
||||||
|
}
|
||||||
|
conv.Attr = new JsonObjectMessage {
|
||||||
|
Data = JsonConvert.SerializeObject(LCEncoder.Encode(attrs))
|
||||||
|
};
|
||||||
if (Client.SignatureFactory != null) {
|
if (Client.SignatureFactory != null) {
|
||||||
LCIMSignature signature = await Client.SignatureFactory.CreateStartConversationSignature(Client.Id, members);
|
LCIMSignature signature = await Client.SignatureFactory.CreateStartConversationSignature(Client.Id, members);
|
||||||
conv.S = signature.Signature;
|
conv.S = signature.Signature;
|
||||||
|
|
Loading…
Reference in New Issue