Don't break feed if user has no posts.
authorRoger Braun <roger@rogerbraun.net>
Sun, 23 Apr 2017 08:38:24 +0000 (10:38 +0200)
committerRoger Braun <roger@rogerbraun.net>
Sun, 23 Apr 2017 08:38:24 +0000 (10:38 +0200)
lib/pleroma/web/ostatus/feed_representer.ex

index 749cb10d0665ed27b21f0653229c37865c54d643..14ac3ebf4786fccd6feef406820211a7fddb6cd8 100644 (file)
@@ -3,7 +3,7 @@ defmodule Pleroma.Web.OStatus.FeedRepresenter do
   alias Pleroma.Web.OStatus.{UserRepresenter, ActivityRepresenter}
 
   def to_simple_form(user, activities, users) do
-    most_recent_update = List.first(activities).updated_at
+    most_recent_update = (List.first(activities) || user).updated_at
     |> NaiveDateTime.to_iso8601
 
     h = fn(str) -> [to_charlist(str)] end