Pleroma v1.1.9-10-g42f76306+dev Pleroma.User View Source

Link to this section Summary

Functions

Fetch some posts when the user has just been federated with

A mass follow for local users. Respects blocks in both directions but does not create activities.

Creates an internal service actor by URI if missing. Optionally takes nickname for addressing.

Gets or fetch a user by uri or nickname.

The function returns a query to get users with no activity for given interval of days. Inactive users are those who didn't read any notification, or had any activity where the user is the activity's actor, during inactivity_threshold days. Deactivated users will not appear in this list.

Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)

Enable or disable email notifications for user

Set last_digest_emailed_at value for the user to current time

Link to this section Types

Link to this type

t()

View Source
t() :: %Pleroma.User{
  __meta__: term(),
  ap_id: term(),
  avatar: term(),
  bio: term(),
  email: term(),
  follower_address: term(),
  following: term(),
  following_address: term(),
  id: term(),
  info: term(),
  inserted_at: term(),
  keys: term(),
  last_digest_emailed_at: term(),
  last_refreshed_at: term(),
  local: term(),
  name: term(),
  nickname: term(),
  notifications: term(),
  password: term(),
  password_confirmation: term(),
  password_hash: term(),
  registrations: term(),
  search_rank: term(),
  search_type: term(),
  tags: term(),
  updated_at: term()
}

Link to this section Functions

Link to this function

all_superusers()

View Source
all_superusers() :: [Pleroma.User.t()]
Link to this function

ap_following(user)

View Source
ap_following(Pleroma.User.t()) :: Sring.t()
Link to this function

avatar_url(user, options \\ [])

View Source
Link to this function

block_domain(user, domain)

View Source
Link to this function

blocked_users(user)

View Source
blocked_users(Pleroma.User.t()) :: [Pleroma.User.t()]
Link to this function

blocks_ap_id?(user, target)

View Source
Link to this function

blocks_domain?(user, target)

View Source
Link to this function

blocks_import(blocker, blocked_identifiers)

View Source
Link to this function

change_email(user, email)

View Source
Link to this function

deactivate(user, status \\ true)

View Source
Link to this function

deactivate_async(user, status \\ true)

View Source
Link to this function

decrease_note_count(user)

View Source
Link to this function

delete_user_activities(user)

View Source
Link to this function

ensure_keys_present(user)

View Source
Link to this function

external_users(opts \\ [])

View Source
external_users(keyword()) :: [Pleroma.User.t()]
Link to this function

external_users_query()

View Source
external_users_query() :: Ecto.Query.t()
Link to this function

fetch_by_nickname(nickname)

View Source
Link to this function

fetch_follow_information(user)

View Source
Link to this function

fetch_initial_posts(user)

View Source

Fetch some posts when the user has just been federated with

Link to this function

follow(follower, followed)

View Source
Link to this function

follow_all(follower, followeds)

View Source
follow_all(Pleroma.User.t(), [Pleroma.User.t()]) :: {atom(), Pleroma.User.t()}

A mass follow for local users. Respects blocks in both directions but does not create activities.

Link to this function

follow_import(follower, followed_identifiers)

View Source
Link to this function

follow_state(user, target)

View Source
Link to this function

following?(follower, followed)

View Source
following?(Pleroma.User.t(), Pleroma.User.t()) :: boolean()
Link to this function

full_nickname(nickname_or_mention)

View Source
Link to this function

get_all_by_ap_id(ap_ids)

View Source
Link to this function

get_ap_ids_by_nicknames(nicknames)

View Source
Link to this function

get_by_guessed_nickname(ap_id)

View Source
Link to this function

get_by_nickname(nickname)

View Source
Link to this function

get_by_nickname_or_email(nickname_or_email)

View Source
Link to this function

get_cached_by_ap_id(ap_id)

View Source
Link to this function

get_cached_by_nickname(nickname)

View Source
Link to this function

get_cached_by_nickname_or_id(nickname_or_id, opts \\ [])

View Source
Link to this function

get_cached_follow_state(user, target)

View Source
Link to this function

get_cached_user_info(user)

View Source
Link to this function

get_external_followers(user, page \\ nil)

View Source
get_external_followers(Pleroma.User.t(), pos_integer()) ::
  {:ok, [Pleroma.User.t()]}
Link to this function

get_follow_requests(user)

View Source
get_follow_requests(Pleroma.User.t()) :: {:ok, [Pleroma.User.t()]}
Link to this function

get_followers(user, page \\ nil)

View Source
get_followers(Pleroma.User.t(), pos_integer()) :: {:ok, [Pleroma.User.t()]}
Link to this function

get_followers_ids(user, page \\ nil)

View Source
Link to this function

get_followers_query(user)

View Source
get_followers_query(Pleroma.User.t()) :: Ecto.Query.t()
Link to this function

get_followers_query(user, page)

View Source
get_followers_query(Pleroma.User.t(), pos_integer() | nil) :: Ecto.Query.t()
Link to this function

get_friends(user, page \\ nil)

View Source
Link to this function

get_friends_ids(user, page \\ nil)

View Source
Link to this function

get_friends_query(user)

View Source
get_friends_query(Pleroma.User.t()) :: Ecto.Query.t()
Link to this function

get_friends_query(user, page)

View Source
get_friends_query(Pleroma.User.t(), pos_integer() | nil) :: Ecto.Query.t()
Link to this function

get_or_create_service_actor_by_ap_id(uri, nickname \\ nil)

View Source

Creates an internal service actor by URI if missing. Optionally takes nickname for addressing.

Link to this function

get_or_fetch(uri)

View Source
get_or_fetch(String.t()) :: {:ok, Pleroma.User.t()} | {:error, String.t()}

Gets or fetch a user by uri or nickname.

Link to this function

get_or_fetch_by_ap_id(ap_id)

View Source
Link to this function

get_or_fetch_by_nickname(nickname)

View Source
Link to this function

get_public_key_for_ap_id(ap_id)

View Source
Link to this function

get_recipients_from_activity(activity)

View Source
get_recipients_from_activity(Pleroma.Activity.t()) :: [Pleroma.User.t()]
Link to this function

get_users_from_set(ap_ids, local_only \\ true)

View Source
get_users_from_set([String.t()], boolean()) :: [Pleroma.User.t()]
Link to this function

html_filter_policy(arg1)

View Source
Link to this function

increase_note_count(user)

View Source
Link to this function

insert_or_update_user(data)

View Source
Link to this function

list_inactive_users_query(inactivity_threshold \\ 7)

View Source
list_inactive_users_query(integer()) :: Ecto.Query.t()

The function returns a query to get users with no activity for given interval of days. Inactive users are those who didn't read any notification, or had any activity where the user is the activity's actor, during inactivity_threshold days. Deactivated users will not appear in this list.

Examples

iex> Pleroma.User.list_inactive_users()
%Ecto.Query{}
Link to this function

local_nickname(nickname_or_mention)

View Source
Link to this function

maybe_direct_follow(follower, followed)

View Source
maybe_direct_follow(Pleroma.User.t(), Pleroma.User.t()) ::
  {:ok, Pleroma.User.t()} | {:error, String.t()}
Link to this function

maybe_fetch_follow_information(user)

View Source
maybe_fetch_follow_information(Pleroma.User.t()) :: Pleroma.User.t()
Link to this function

maybe_update_following_count(user)

View Source
maybe_update_following_count(Pleroma.User.t()) :: Pleroma.User.t()
Link to this function

mute(muter, user, notifications? \\ true)

View Source
mute(Pleroma.User.t(), Pleroma.User.t(), boolean()) ::
  {:ok, Pleroma.User.t()} | {:error, String.t()}
Link to this function

muted_notifications?(user, arg2)

View Source
muted_notifications?(Pleroma.User.t() | nil, Pleroma.User.t() | map()) ::
  boolean()
Link to this function

password_update_changeset(struct, params)

View Source
Link to this function

perform(atom, user)

View Source
perform(atom(), Pleroma.User.t()) :: {:ok, Pleroma.User.t()}
perform(atom(), Pleroma.User.t()) :: {:ok, Pleroma.User.t()}
Link to this function

perform(atom, user, status)

View Source
perform(atom(), Pleroma.User.t(), list()) :: list() | {:error, any()}
perform(atom(), Pleroma.User.t(), list()) :: list() | {:error, any()}
Link to this function

post_register_action(user)

View Source
Link to this function

public_key_from_info(arg1)

View Source

Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)

Link to this function

register_changeset(struct, params \\ %{}, opts \\ [])

View Source
Link to this function

remote_user_creation(params)

View Source
Link to this function

remove_duplicated_following(user)

View Source
Link to this function

reset_password(user, data)

View Source
reset_password(Pleroma.User.t(), map()) ::
  {:ok, Pleroma.User.t()} | {:error, Ecto.Changeset.t()}
Link to this function

restrict_deactivated(query)

View Source
restrict_deactivated(Ecto.Query.t()) :: Ecto.Query.t()
Link to this function

search(query, opts \\ [])

View Source

See Pleroma.User.Search.search/2.

Link to this function

set_follow_state_cache(user_ap_id, target_ap_id, state)

View Source
Link to this function

set_info_cache(user, args)

View Source
Link to this function

showing_reblogs?(user, target)

View Source
Link to this function

subscribe(subscriber, map)

View Source
Link to this function

subscribed_to?(user, map)

View Source
Link to this function

switch_email_notifications(user, type, status)

View Source
switch_email_notifications(t(), String.t(), boolean()) ::
  {:ok, t()} | {:error, Ecto.Changeset.t()}

Enable or disable email notifications for user

Examples

iex> Pleroma.User.switch_email_notifications(Pleroma.User{info: %{email_notifications: %{"digest" => false}}}, "digest", true)
Pleroma.User{info: %{email_notifications: %{"digest" => true}}}

iex> Pleroma.User.switch_email_notifications(Pleroma.User{info: %{email_notifications: %{"digest" => true}}}, "digest", false)
Pleroma.User{info: %{email_notifications: %{"digest" => false}}}
Link to this function

tag(user_identifiers, tags)

View Source
Link to this function

toggle_confirmation(user)

View Source
toggle_confirmation(Pleroma.User.t()) ::
  {:ok, Pleroma.User.t()} | {:error, Changeset.t()}
Link to this function

touch_last_digest_emailed_at(user)

View Source
touch_last_digest_emailed_at(t()) :: t()

Set last_digest_emailed_at value for the user to current time

Link to this function

try_send_confirmation_email(user)

View Source
Link to this function

unblock_domain(user, domain)

View Source
Link to this function

unfollow(follower, followed)

View Source
Link to this function

unsubscribe(unsubscriber, map)

View Source
Link to this function

untag(user_identifiers, tags)

View Source
Link to this function

update_and_set_cache(changeset)

View Source
Link to this function

update_changeset(struct, params \\ %{})

View Source
Link to this function

update_follower_count(user)

View Source
Link to this function

update_notification_settings(user, settings \\ %{})

View Source
Link to this function

upgrade_changeset(struct, params \\ %{}, remote? \\ false)

View Source
Link to this function

user_info(user, args \\ %{})

View Source
Link to this function

visible_for?(user, for_user \\ nil)

View Source
Link to this function

wait_and_refresh(timeout, a, b)

View Source