Fix build. Too eager with the fixing of unused variables.
authorMark Felder <feld@feld.me>
Fri, 4 May 2018 21:26:33 +0000 (21:26 +0000)
committerMark Felder <feld@feld.me>
Fri, 4 May 2018 21:26:33 +0000 (21:26 +0000)
== Compilation error in file lib/pleroma/web/activity_pub/views/user_view.ex ==
** (CompileError) lib/pleroma/web/activity_pub/views/user_view.ex:54: undefined function _total/0
    (stdlib) lists.erl:1338: :lists.foreach/2
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6

lib/pleroma/web/activity_pub/views/user_view.ex

index 733e5fb57aa4571240ffb92b7f80a2f8f275e863..d6bf71884492604075eb7f4d50bca2c5619c8f9a 100644 (file)
@@ -51,7 +51,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
     offset = (page - 1) * 10
     items = Enum.slice(collection, offset, 10)
     items = Enum.map(items, fn user -> user.ap_id end)
-    _total = _total || length(collection)
+    total = _total || length(collection)
 
     map = %{
       "id" => "#{iri}?page=#{page}",