Refactoring of Events context
This commit is contained in:
@@ -45,6 +45,7 @@ defmodule Mobilizon.Actors do
|
||||
:creator
|
||||
])
|
||||
|
||||
@public_visibility [:public, :unlisted]
|
||||
@administrator_roles [:creator, :administrator]
|
||||
|
||||
@doc false
|
||||
@@ -836,7 +837,7 @@ defmodule Mobilizon.Actors do
|
||||
from(
|
||||
a in Actor,
|
||||
where: a.type == ^:Group,
|
||||
where: a.visibility in ^[:public, :unlisted]
|
||||
where: a.visibility in ^@public_visibility
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -3,11 +3,19 @@ defmodule Mobilizon.Events.Activity do
|
||||
Represents an activity.
|
||||
"""
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
data: String.t(),
|
||||
local: boolean,
|
||||
actor: Actor.t(),
|
||||
recipients: [String.t()]
|
||||
# notifications: [???]
|
||||
}
|
||||
|
||||
defstruct [
|
||||
:data,
|
||||
:local,
|
||||
:actor,
|
||||
:recipients,
|
||||
:notifications
|
||||
:recipients
|
||||
# :notifications
|
||||
]
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user