Skip to content

Commit ce6cc5f

Browse files
committed
fix warning + comment + default event type
1 parent e83c00b commit ce6cc5f

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

Assets/Plugins/StreamChat/Core/InternalDTO/Events/MessageNewEventInternalDTO.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal partial class MessageNewEventInternalDTO
3838
public System.Collections.Generic.List<UserObjectInternalDTO> ThreadParticipants { get; set; }
3939

4040
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
41-
public string Type { get; set; } = "notification.thread_message_new";
41+
public string Type { get; set; } = "message.new";
4242

4343
[Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
4444
public UserObjectInternalDTO User { get; set; }

Assets/Plugins/StreamChat/Core/LowLevelClient/Requests/BanRequest.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using StreamChat.Core.Helpers;
33
using StreamChat.Core.InternalDTO.Requests;
4+
using StreamChat.Core.StatefulModels;
45

56
namespace StreamChat.Core.LowLevelClient.Requests
67
{
@@ -19,11 +20,11 @@ public partial class BanRequest : RequestObjectBase, ISavableTo<BanRequestIntern
1920
public string BannedById { get; set; }
2021

2122
/// <summary>
22-
/// Channel CID to ban user in eg. messaging:123
23+
/// Channel CID to ban user in e.g. messaging:123. You can grab the channel CID from objects like <see cref="IStreamChannel.Cid"/>, <see cref="IStreamMessage.Cid"/>
2324
/// </summary>
2425
public string ChannelCid { get; set; }
2526

26-
[Obsolete("Has no effect and will be removed in a future release")] //StreamTODO: remove this in a major release
27+
[Obsolete("Will be removed in a future release. Please use the ChannelCid field")] //StreamTODO: remove this in a major release
2728
public string Id { get; set; }
2829

2930
/// <summary>
@@ -37,7 +38,7 @@ public partial class BanRequest : RequestObjectBase, ISavableTo<BanRequestIntern
3738
public string Reason { get; set; }
3839

3940
/// <summary>
40-
/// Whether to perform shadow ban or not
41+
/// Whether to perform shadow-ban or not
4142
/// </summary>
4243
public bool? Shadow { get; set; }
4344

@@ -51,7 +52,7 @@ public partial class BanRequest : RequestObjectBase, ISavableTo<BanRequestIntern
5152
/// </summary>
5253
public int? Timeout { get; set; }
5354

54-
[Obsolete("Has no effect and will be removed in a future release")] //StreamTODO: remove this in a major release
55+
[Obsolete("Will be removed in a future release. Please use the ChannelCid field")] //StreamTODO: remove this in a major release
5556
public string Type { get; set; }
5657

5758
[Obsolete("Has no effect and will be removed in a future release")] //StreamTODO: remove this in a major release
@@ -62,6 +63,7 @@ public partial class BanRequest : RequestObjectBase, ISavableTo<BanRequestIntern
6263

6364
BanRequestInternalDTO ISavableTo<BanRequestInternalDTO>.SaveToDto()
6465
{
66+
#pragma warning disable CS0618
6567
string GetCid()
6668
{
6769
if(string.IsNullOrEmpty(ChannelCid) && !string.IsNullOrEmpty(Id) && !string.IsNullOrEmpty(Type))
@@ -71,6 +73,7 @@ string GetCid()
7173

7274
return ChannelCid;
7375
}
76+
#pragma warning restore CS0618
7477
return new BanRequestInternalDTO
7578
{
7679
BannedBy = BannedBy.TrySaveToDto<UserRequestInternalDTO>(),

Assets/Plugins/StreamChat/Core/StatefulModels/IStreamMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface IStreamMessage : IStreamStatefulModel
3333
IReadOnlyList<StreamMessageAttachment> Attachments { get; }
3434

3535
/// <summary>
36-
/// Channel unique identifier in &lt;type&gt;:&lt;id&gt; format
36+
/// Channel unique identifier in type:id format
3737
/// </summary>
3838
string Cid { get; }
3939

0 commit comments

Comments
 (0)