summaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-01-28 16:58:23 -0500
committerMark Felder <feld@feld.me>2024-01-28 17:14:37 -0500
commit082d665160547d16a3a436d5ead327f2899b04da (patch)
tree96ecf63f4998ca0c13a09ae00229bf1385542d74 /lib/pleroma/user.ex
parenta3024dd5ac28bc23a91b12fa15ab56d15c1c341d (diff)
Pleroma.Web.AdminAPI.UserController: dialyzer errors
lib/pleroma/web/admin_api/controllers/user_controller.ex:205:no_return Function activate/2 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:215:call The function call will not succeed. Keyword.values( _updated_users :: %Pleroma.User{ :__meta__ => _, :accepts_chat_messages => _, :actor_type => _, :allow_following_move => _, :also_known_as => _, :ap_id => _, :avatar => _, :background => _, :banner => _, :bio => _, :birthday => _, :blocked_users => _, :blockee_blocks => _, :blocker_blocks => _, :blocker_users => _, :blocks => _, :confirmation_token => _, :default_scope => _, :deliveries => _, :disclose_client => _, :domain_blocks => _, :email => _, :email_notifications => _, :emoji => _, :endorsed_users => _, :endorsee_endorsements => _, :endorser_endorsements => _, :endorser_users => _, :featured_address => _, :fields => _, :follower_address => _, :follower_count => _, :following_address => _, :following_count => _, :hide_favorites => _, :hide_followers => _, :hide_followers_count => _, :hide_follows => _, :hide_follows_count => _, :id => _, :inbox => _, :incoming_relationships => _, :inserted_at => _, :invisible => _, :is_active => _, :is_admin => _, :is_approved => _, :is_confirmed => _, :is_discoverable => _, :is_locked => _, :is_moderator => _, :is_suggested => _, :keys => _, :language => _, :last_active_at => _, :last_digest_emailed_at => _, :last_refreshed_at => _, :last_status_at => _, :local => _, :mascot => _, :multi_factor_authentication_settings => _, :muted_notifications => _, :muted_reblogs => _, :muted_users => _, :mutee_mutes => _, :muter_mutes => _, :muter_users => _, :mutes => _, :name => _, :nickname => _, :no_rich_text => _, :note_count => _, :notification_muted_users => _, :notification_mutee_mutes => _, :notification_muter_mutes => _, :notification_muter_users => _, :notification_settings => _, :notifications => _, :outgoing_relationships => _, :password => _, :password_confirmation => _, :password_hash => _, :password_reset_pending => _, :pinned_objects => _, :pleroma_settings_store => _, :public_key => _, :raw_bio => _, :raw_fields => _, :reblog_muted_users => _, :reblog_mutee_mutes => _, :reblog_muter_mutes => _, :reblog_muter_users => _, :registration_reason => _, :registrations => _, :search_rank => _, :search_type => _, :shared_inbox => _, :show_birthday => _, :show_role => _, :skip_thread_containment => _, :subscribee_subscriptions => _, :subscribee_users => _, :subscriber_subscriptions => _, :subscriber_users => _, :subscribers => _, :tags => _, :updated_at => _, :uri => _ } ) will never return since the success typing is: ([any()]) :: [any()] and the contract is (t()) :: [value()] ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:218:no_return Function deactivate/2 has no local return. ________________________________________________________________________________ lib/pleroma/web/admin_api/controllers/user_controller.ex:228:call The function call will not succeed. Keyword.values( _updated_users :: %Pleroma.User{ :__meta__ => _, :accepts_chat_messages => _, :actor_type => _, :allow_following_move => _, :also_known_as => _, :ap_id => _, :avatar => _, :background => _, :banner => _, :bio => _, :birthday => _, :blocked_users => _, :blockee_blocks => _, :blocker_blocks => _, :blocker_users => _, :blocks => _, :confirmation_token => _, :default_scope => _, :deliveries => _, :disclose_client => _, :domain_blocks => _, :email => _, :email_notifications => _, :emoji => _, :endorsed_users => _, :endorsee_endorsements => _, :endorser_endorsements => _, :endorser_users => _, :featured_address => _, :fields => _, :follower_address => _, :follower_count => _, :following_address => _, :following_count => _, :hide_favorites => _, :hide_followers => _, :hide_followers_count => _, :hide_follows => _, :hide_follows_count => _, :id => _, :inbox => _, :incoming_relationships => _, :inserted_at => _, :invisible => _, :is_active => _, :is_admin => _, :is_approved => _, :is_confirmed => _, :is_discoverable => _, :is_locked => _, :is_moderator => _, :is_suggested => _, :keys => _, :language => _, :last_active_at => _, :last_digest_emailed_at => _, :last_refreshed_at => _, :last_status_at => _, :local => _, :mascot => _, :multi_factor_authentication_settings => _, :muted_notifications => _, :muted_reblogs => _, :muted_users => _, :mutee_mutes => _, :muter_mutes => _, :muter_users => _, :mutes => _, :name => _, :nickname => _, :no_rich_text => _, :note_count => _, :notification_muted_users => _, :notification_mutee_mutes => _, :notification_muter_mutes => _, :notification_muter_users => _, :notification_settings => _, :notifications => _, :outgoing_relationships => _, :password => _, :password_confirmation => _, :password_hash => _, :password_reset_pending => _, :pinned_objects => _, :pleroma_settings_store => _, :public_key => _, :raw_bio => _, :raw_fields => _, :reblog_muted_users => _, :reblog_mutee_mutes => _, :reblog_muter_mutes => _, :reblog_muter_users => _, :registration_reason => _, :registrations => _, :search_rank => _, :search_type => _, :shared_inbox => _, :show_birthday => _, :show_role => _, :skip_thread_containment => _, :subscribee_subscriptions => _, :subscribee_users => _, :subscriber_subscriptions => _, :subscriber_users => _, :subscribers => _, :tags => _, :updated_at => _, :uri => _ } ) will never return since the success typing is: ([any()]) :: [any()] and the contract is (t()) :: [value()]
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r--lib/pleroma/user.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 89a95c435..1457c002c 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -1787,7 +1787,10 @@ defmodule Pleroma.User do
@spec set_activation([User.t()], boolean()) :: {:ok, User.t()} | {:error, Ecto.Changeset.t()}
def set_activation(users, status) when is_list(users) do
Repo.transaction(fn ->
- for user <- users, do: set_activation(user, status)
+ for user <- users do
+ {:ok, user} = set_activation(user, status)
+ user
+ end
end)
end