Skip to content

Commit

Permalink
#1569 Добавить событие message_reaction_event (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmem authored Aug 2, 2023
1 parent 9d97169 commit f84bda5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions VkNet/Model/GroupUpdate/MessageReactionEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using Newtonsoft.Json;

namespace VkNet.Model;

/// <summary> Объект, который содержит событие реакции на сообщение. </summary>
[Serializable]
public class MessageReactionEvent : IGroupUpdate
{
/// <summary>Идентификатор события реакции.</summary>
[JsonProperty("reacted_id")]
public ulong ReactedId { get; set; }

/// <summary>Идентификатор назначения.</summary>
[JsonProperty("peer_id")]
public long PeerId { get; set; }

/// <summary>Идентификатор сообщения в беседе.</summary>
[JsonProperty("cmid")]
public ulong Cmid { get; set; }

/// <summary>Идентификатор реакции.</summary>
[JsonProperty("reaction_id")]
public ulong? ReactionId { get; set; }
}
1 change: 1 addition & 0 deletions VkNet/Utils/JsonConverter/GroupUpdateJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
"market_order_new" => JsonConvert.DeserializeObject<MarketOrder>(resObj),
"market_order_edit" => JsonConvert.DeserializeObject<MarketOrder>(resObj),
"app_payload" => JsonConvert.DeserializeObject<AppPayload>(resObj),
"message_reaction_event" => JsonConvert.DeserializeObject<MessageReactionEvent>(resObj),
var _ => null
},
Raw = JsonConvert.DeserializeObject<VkResponse>(obj.ToString())
Expand Down

0 comments on commit f84bda5

Please sign in to comment.