Skip to content

Commit

Permalink
event: add Has method for Mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 25, 2024
1 parent 4e180ee commit edae083
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions event/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ func (m *Mentions) Add(userID id.UserID) {
}
}

func (m *Mentions) Has(userID id.UserID) bool {
return m != nil && slices.Contains(m.UserIDs, userID)
}

type EncryptedFileInfo struct {
attachment.EncryptedFile
URL id.ContentURIString `json:"url"`
Expand Down

0 comments on commit edae083

Please sign in to comment.