From 31e4277ba5a2a793a0bc94f5d7682a48349583a3 Mon Sep 17 00:00:00 2001 From: eal Date: Sat, 18 Nov 2017 15:25:22 +0200 Subject: [PATCH] Don't add summary if empty. --- .../web/twitter_api/representers/activity_representer.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 3fbeb86ba..b17013d87 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -135,8 +135,9 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do tags = activity.data["object"]["tag"] || [] possibly_sensitive = Enum.member?(tags, "nsfw") - content = if activity.data["object"]["summary"] do - "#{activity.data["object"]["summary"]}
#{content}" + summary = activity.data["object"]["summary"] + content = if !!summary and summary != "" do + "#{activity.data["object"]["summary"]}
#{content}" else content end -- 2.45.2