Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/765
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Jan 9, 2024
1 parent 01ce5da commit 7363dfa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/posts.ex
Expand Up @@ -219,6 +219,19 @@ defmodule Bonfire.Posts do
end
end

def search(search, opts \\ []) do
Utils.maybe_apply(
Bonfire.Search,
:search_by_type,
[search, Post, opts],
&none/2
) || search_db(search, opts)
end

defp none(_, _), do: nil

def search_db(search, opts \\ []), do: Bonfire.Social.PostContents.search_db(search, opts)

# TODO: federated delete, in addition to create:
def ap_publish_activity(subject, verb, post) do
# TODO: get from config
Expand Down

0 comments on commit 7363dfa

Please sign in to comment.