Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1569 Добавить событие message_reaction_event #1570

Merged
merged 1 commit into from
Aug 2, 2023
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
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
Loading