Improved activity page

This commit is contained in:
2021-11-23 15:47:25 +09:00
parent 1cf4e6a1ae
commit 0f5f18db0c
12 changed files with 113 additions and 32 deletions

View File

@ -55,6 +55,10 @@ func (user *User) Unfollow(userID UserID) bool {
// IsFollowing checks if the object follows the user ID.
func (user *User) IsFollowing(userID UserID) bool {
if userID == user.ID {
return true
}
for _, item := range user.FollowIDs {
if item == userID {
return true