Make activitypub types comparisons be case insensitive
This commit is contained in:
parent
333ff2b6c2
commit
0a2f998222
|
@ -2,6 +2,7 @@ package activitypub
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -42,7 +43,7 @@ type ActivityVocabularyTypes []ActivityVocabularyType
|
|||
|
||||
func (a ActivityVocabularyTypes) Contains(typ ActivityVocabularyType) bool {
|
||||
for _, v := range a {
|
||||
if v == typ {
|
||||
if strings.ToLower(string(v)) == strings.ToLower(string(typ)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue