Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update follow.go

Cette révision appartient à :
kilo 2017-10-31 23:07:03 +01:00 révisé par GitHub
Parent 73441008c7
révision 287f0b0fac
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 1 suppressions

Voir le fichier

@ -15,7 +15,7 @@ func UserFollowHandler(c *gin.Context) {
id, _ := strconv.ParseUint(c.Param("id"), 10, 32)
currentUser := router.GetUser(c)
user, _, errorUser := users.FindForAdmin(uint(id))
if errorUser == nil && user.ID > 0 {
if errorUser == nil && user.ID > 0 && currentUser.ID > 0 && user.ID != currentUser.ID {
if !currentUser.IsFollower(uint(id)) {
followAction = "followed"
currentUser.SetFollow(user)