From: eal Date: Sat, 18 Nov 2017 13:25:22 +0000 (+0200) Subject: Don't add summary if empty. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=31e4277ba5a2a793a0bc94f5d7682a48349583a3;p=akkoma Don't add summary if empty. --- 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