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

Link to this section Summary

Link to this section Types

Link to this type

t()

View Source
t() :: %Pleroma.Notification{
  __meta__: term(),
  activity: term(),
  activity_id: term(),
  id: term(),
  inserted_at: term(),
  seen: term(),
  updated_at: term(),
  user: term(),
  user_id: term()
}

Link to this section Functions

Link to this function

changeset(notification, attrs)

View Source
Link to this function

create_notification(activity, user)

View Source
Link to this function

create_notifications(activity)

View Source
Link to this function

destroy_multiple(user, ids)

View Source
Link to this function

for_user(user, opts \\ %{})

View Source
Link to this function

for_user_query(user, opts \\ [])

View Source
Link to this function

for_user_since(user, date)

View Source
for_user_since(Pleroma.User.t(), NaiveDateTime.t()) :: [t()]

Returns notifications for user received since given date.

Examples

iex> Pleroma.Notification.for_user_since(%Pleroma.User{}, ~N[2019-04-13 11:22:33])
[%Pleroma.Notification{}, %Pleroma.Notification{}]

iex> Pleroma.Notification.for_user_since(%Pleroma.User{}, ~N[2019-04-15 11:22:33])
[]
Link to this function

get_notified_from_activity(activity, local_only \\ true)

View Source
Link to this function

read_one(user, notification_id)

View Source
Link to this function

set_read_up_to(user, id)

View Source