More implementations for IsLink and GetType

This commit is contained in:
Marius Orcsik 2018-07-20 18:28:26 +02:00
parent fb7c74da76
commit 57dab0cb45
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A

View file

@ -803,9 +803,9 @@ func (l Like) GetID() ObjectID {
return Activity(l).GetID()
}
// GetID returns the ObjectID corresponding to the Like object
func (d Dislike) GetID() ObjectID {
return Activity(d).GetID()
// GetType
func (l Like) GetType() ActivityVocabularyType {
return l.Type
}
// IsObject returns true for Like objects
@ -813,7 +813,27 @@ func (l Like) IsObject() bool {
return true
}
// IsLink returns false for Like objects
func (l Like) IsLink() bool {
return false
}
// GetID returns the ObjectID corresponding to the Like object
func (d Dislike) GetID() ObjectID {
return Activity(d).GetID()
}
// GetType
func (d Dislike) GetType() ActivityVocabularyType {
return d.Type
}
// IsObject returns true for Dislike objects
func (d Dislike) IsObject() bool {
return true
}
// IsLink returns false for Dislike objects
func (d Dislike) IsLink() bool {
return false
}