-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(event): support message_recalled, message_reaction_created, and …
…message_reaction_deleted [ci skip]
- Loading branch information
Showing
5 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package lark | ||
|
||
// EventV2MessageReactionCreated . | ||
type EventV2MessageReactionCreated struct { | ||
MessageID string `json:"message_id,omitempty"` | ||
OperatorType string `json:"operator_type,omitempty"` | ||
UserID EventV2UserID `json:"user_id,omitempty"` | ||
AppID string `json:"app_id,omitempty"` | ||
ActionTime string `json:"action_time,omitempty"` | ||
ReactionType struct { | ||
EmojiType string `json:"emoji_type,omitempty"` | ||
} `json:"reaction_type,omitempty"` | ||
} | ||
|
||
// GetMessageReactionCreated . | ||
func (e EventV2) GetMessageReactionCreated() (*EventV2MessageReactionCreated, error) { | ||
var body EventV2MessageReactionCreated | ||
err := e.GetEvent(EventTypeMessageReactionCreated, &body) | ||
return &body, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package lark | ||
|
||
// EventV2MessageReactionDeleted . | ||
type EventV2MessageReactionDeleted struct { | ||
MessageID string `json:"message_id,omitempty"` | ||
OperatorType string `json:"operator_type,omitempty"` | ||
UserID EventV2UserID `json:"user_id,omitempty"` | ||
AppID string `json:"app_id,omitempty"` | ||
ActionTime string `json:"action_time,omitempty"` | ||
ReactionType struct { | ||
EmojiType string `json:"emoji_type,omitempty"` | ||
} `json:"reaction_type,omitempty"` | ||
} | ||
|
||
// GetMessageReactionDeleted . | ||
func (e EventV2) GetMessageReactionDeleted() (*EventV2MessageReactionDeleted, error) { | ||
var body EventV2MessageReactionDeleted | ||
err := e.GetEvent(EventTypeMessageReactionDeleted, &body) | ||
return &body, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package lark | ||
|
||
// EventV2MessageRecalled . | ||
type EventV2MessageRecalled struct { | ||
MessageID string `json:"message_id,omitempty"` | ||
ChatID string `json:"chat_id,omitempty"` | ||
RecallTime string `json:"recall_time,omitempty"` | ||
RecallType string `json:"recall_type,omitempty"` | ||
} | ||
|
||
// GetMessageRecalled . | ||
func (e EventV2) GetMessageRecalled() (*EventV2MessageRecalled, error) { | ||
var body EventV2MessageRecalled | ||
err := e.GetEvent(EventTypeMessageRecalled, &body) | ||
return &body, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters