Skip to content

Commit

Permalink
add MessageEdit event
Browse files Browse the repository at this point in the history
  • Loading branch information
vildan-valeev committed Dec 28, 2023
1 parent a0313d5 commit d73ff63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ type MessageNew struct {
// MessageReply struct.
type MessageReply Message

// // MessageEditObject struct.
// type MessageEditObject object.MessagesMessage
//
// MessageEdit struct.
type MessageEdit Message

// // MessageAllowObject struct.
//
// type MessageAllowObject struct {
Expand Down
4 changes: 4 additions & 0 deletions responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ type Object struct {
*MessageNew
*MessageReply
*MessageEvent
*MessageEdit
// TODO: добавить остальные объекты Events
}

Expand Down Expand Up @@ -219,6 +220,9 @@ func (u *Update) UnmarshalJSON(data []byte) error {
case EventMessageReply:
u.Object.MessageReply = &MessageReply{}
return json.Unmarshal(temp.Object, u.Object.MessageReply)
case EventMessageEdit:
u.Object.MessageEdit = &MessageEdit{}
return json.Unmarshal(temp.Object, u.Object.MessageEdit)
case EventMessageEvent:
u.Object.MessageEvent = &MessageEvent{}
return json.Unmarshal(temp.Object, u.Object.MessageEvent)
Expand Down

0 comments on commit d73ff63

Please sign in to comment.