From 5d81421e8d5564ae1c191503406302d988924909 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 3 Jan 2020 14:36:00 +0100 Subject: [PATCH] Fix issue for visitors --- src/controllers/UserController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/UserController.ts b/src/controllers/UserController.ts index fb59dee..23f4af6 100644 --- a/src/controllers/UserController.ts +++ b/src/controllers/UserController.ts @@ -92,7 +92,7 @@ export class UserController { info["pageLikes"] = await LikesHelper.Count(user.id, LikesType.USER); info["user_like_page"] = h.signedIn ? await LikesHelper.IsLiking(h.getUserId(), user.id, LikesType.USER) : false; - info["can_post_texts"] = await UserHelper.CanCreatePosts(h.getUserId(), user.id); + info["can_post_texts"] = h.signedIn ? await UserHelper.CanCreatePosts(h.getUserId(), user.id) : false; } return info;