parent
228bf4d214
commit
9f99640cfc
7 changed files with 32 additions and 6 deletions
|
|
@ -64,4 +64,12 @@ defmodule Pleroma.Activity.Queries do
|
|||
where: fragment("(?)->>'type' = ?", activity.data, ^activity_type)
|
||||
)
|
||||
end
|
||||
|
||||
@spec exclude_type(query, String.t()) :: query
|
||||
def exclude_type(query \\ Activity, activity_type) do
|
||||
from(
|
||||
activity in query,
|
||||
where: fragment("(?)->>'type' != ?", activity.data, ^activity_type)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue