mirror of
https://github.com/gissleh/irc.git
synced 2026-09-29 00:05:34 +00:00
This commit is contained in:
@@ -175,6 +175,15 @@ func (event *Event) StatusTarget() *Status {
|
||||
return target.(*Status)
|
||||
}
|
||||
|
||||
func (event *Event) TargetIDs() []string {
|
||||
ids := make([]string, len(event.targets))
|
||||
for _, value := range event.targetIds {
|
||||
ids = append(ids, value)
|
||||
}
|
||||
|
||||
return ids
|
||||
}
|
||||
|
||||
// MarshalJSON makes a JSON object from the event.
|
||||
func (event *Event) MarshalJSON() ([]byte, error) {
|
||||
data := eventJSONData{
|
||||
|
||||
Reference in New Issue
Block a user