projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix all count
[akkoma]
/
lib
/
pleroma
/
activity
/
queries.ex
diff --git
a/lib/pleroma/activity/queries.ex
b/lib/pleroma/activity/queries.ex
index 949f010a81f840368fa8cf41a1f39297b8132104..26bc1099daea092b78ae7b6e5ad9c0c561608183 100644
(file)
--- a/
lib/pleroma/activity/queries.ex
+++ b/
lib/pleroma/activity/queries.ex
@@
-64,4
+64,12
@@
defmodule Pleroma.Activity.Queries do
where: fragment("(?)->>'type' = ?", activity.data, ^activity_type)
)
end
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
end