projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add delete activity representer.
[akkoma]
/
lib
/
pleroma
/
web
/
ostatus
/
ostatus_controller.ex
diff --git
a/lib/pleroma/web/ostatus/ostatus_controller.ex
b/lib/pleroma/web/ostatus/ostatus_controller.ex
index 948996d01a36bbf9298a90059dcb6ecaaad1fa53..05acfd04bc0f3d5879b4a4c4e3b9d185e8676339 100644
(file)
--- a/
lib/pleroma/web/ostatus/ostatus_controller.ex
+++ b/
lib/pleroma/web/ostatus/ostatus_controller.ex
@@
-9,13
+9,17
@@
defmodule Pleroma.Web.OStatus.OStatusController do
def feed_redirect(conn, %{"nickname" => nickname}) do
user = User.get_cached_by_nickname(nickname)
def feed_redirect(conn, %{"nickname" => nickname}) do
user = User.get_cached_by_nickname(nickname)
- redirect conn, external: OStatus.feed_path(user)
+
+ case get_format(conn) do
+ "html" -> Fallback.RedirectController.redirector(conn, nil)
+ _ -> redirect conn, external: OStatus.feed_path(user)
+ end
end
def feed(conn, %{"nickname" => nickname}) do
user = User.get_cached_by_nickname(nickname)
query = from activity in Activity,
end
def feed(conn, %{"nickname" => nickname}) do
user = User.get_cached_by_nickname(nickname)
query = from activity in Activity,
- where: fragment("?
@> ?", activity.data, ^%{actor: user.ap_id}
),
+ where: fragment("?
->>'actor' = ?", activity.data, ^user.ap_id
),
limit: 20,
order_by: [desc: :inserted_at]
limit: 20,
order_by: [desc: :inserted_at]