Use empty context id if we get none
authorRoger Braun <roger@rogerbraun.net>
Mon, 1 May 2017 18:38:01 +0000 (20:38 +0200)
committerRoger Braun <roger@rogerbraun.net>
Mon, 1 May 2017 18:38:01 +0000 (20:38 +0200)
Thanks mastodon.

lib/pleroma/web/ostatus/ostatus.ex

index 01d6745ef41faa74560784fb7f4f21e13855e81c..6a6f43acf212df65233044b247233696ea38d5f8 100644 (file)
@@ -45,7 +45,7 @@ defmodule Pleroma.Web.OStatus do
     uri = string_from_xpath("/entry/author/uri[1]", entry) || string_from_xpath("/feed/author/uri[1]", doc)
     {:ok, actor} = find_or_make_user(uri)
 
-    context = string_from_xpath("/entry/ostatus:conversation[1]", entry) |> String.trim
+    context = (string_from_xpath("/entry/ostatus:conversation[1]", entry) || "") |> String.trim
     context = if String.length(context) > 0 do
       context
     else