From: Roger Braun Date: Mon, 8 May 2017 22:20:05 +0000 (+0200) Subject: Quick fix for database filling. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=71362acb93f73a571c3cf497fddee2ac14cd906a;p=akkoma Quick fix for database filling. --- diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index 96a5f2151..3fb60da6c 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -14,7 +14,8 @@ defmodule Pleroma.Web.TwitterAPI.Controller do end def status_update(%{assigns: %{user: user}} = conn, %{"status" => status_text} = status_data) do - if status_text |> String.trim |> String.length != 0 do + l = status_text |> String.trim |> String.length + if l > 0 && l < 5000 do media_ids = extract_media_ids(status_data) {:ok, activity} = TwitterAPI.create_status(user, Map.put(status_data, "media_ids", media_ids)) conn