summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--README.md2
-rw-r--r--config/emoji.txt28
-rw-r--r--docs/config.md2
-rw-r--r--docs/config/howto_mediaproxy.md4
-rw-r--r--lib/pleroma/web/activity_pub/views/object_view.ex4
-rw-r--r--priv/static/emoji/f_00b.pngbin371 -> 0 bytes
-rw-r--r--priv/static/emoji/f_00b11b.pngbin661 -> 0 bytes
-rw-r--r--priv/static/emoji/f_00b33b.pngbin662 -> 0 bytes
-rw-r--r--priv/static/emoji/f_00h.pngbin7522 -> 0 bytes
-rw-r--r--priv/static/emoji/f_00t.pngbin541 -> 0 bytes
-rw-r--r--priv/static/emoji/f_01b.pngbin4510 -> 0 bytes
-rw-r--r--priv/static/emoji/f_03b.pngbin2872 -> 0 bytes
-rw-r--r--priv/static/emoji/f_10b.pngbin2849 -> 0 bytes
-rw-r--r--priv/static/emoji/f_11b.pngbin447 -> 0 bytes
-rw-r--r--priv/static/emoji/f_11b00b.pngbin615 -> 0 bytes
-rw-r--r--priv/static/emoji/f_11b22b.pngbin618 -> 0 bytes
-rw-r--r--priv/static/emoji/f_11h.pngbin7314 -> 0 bytes
-rw-r--r--priv/static/emoji/f_11t.pngbin559 -> 0 bytes
-rw-r--r--priv/static/emoji/f_12b.pngbin4352 -> 0 bytes
-rw-r--r--priv/static/emoji/f_21b.pngbin2900 -> 0 bytes
-rw-r--r--priv/static/emoji/f_22b.pngbin386 -> 0 bytes
-rw-r--r--priv/static/emoji/f_22b11b.pngbin666 -> 0 bytes
-rw-r--r--priv/static/emoji/f_22b33b.pngbin663 -> 0 bytes
-rw-r--r--priv/static/emoji/f_22h.pngbin7448 -> 0 bytes
-rw-r--r--priv/static/emoji/f_22t.pngbin549 -> 0 bytes
-rw-r--r--priv/static/emoji/f_23b.pngbin4334 -> 0 bytes
-rw-r--r--priv/static/emoji/f_30b.pngbin4379 -> 0 bytes
-rw-r--r--priv/static/emoji/f_32b.pngbin2921 -> 0 bytes
-rw-r--r--priv/static/emoji/f_33b.pngbin459 -> 0 bytes
-rw-r--r--priv/static/emoji/f_33b00b.pngbin611 -> 0 bytes
-rw-r--r--priv/static/emoji/f_33b22b.pngbin623 -> 0 bytes
-rw-r--r--priv/static/emoji/f_33h.pngbin7246 -> 0 bytes
-rw-r--r--priv/static/emoji/f_33t.pngbin563 -> 0 bytes
-rw-r--r--test/support/factory.ex4
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs53
36 files changed, 62 insertions, 38 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b0a6189a..e2cbbb88c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,6 +77,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- RichMedia: parsers and their order are configured in `rich_media` config.
- RichMedia: add the rich media ttl based on image expiration time.
+### Removed
+- Emoji: Remove longfox emojis.
+
## [1.0.1] - 2019-07-14
### Security
- OStatus: fix an object spoofing vulnerability.
diff --git a/README.md b/README.md
index 41d454a03..5aad34ccc 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ If you want to run your own server, feel free to contact us at @lain@pleroma.soy
Currently Pleroma is not packaged by any OS/Distros, but feel free to reach out to us at [#pleroma-dev on freenode](https://webchat.freenode.net/?channels=%23pleroma-dev) or via matrix at <https://matrix.heldscal.la/#/room/#freenode_#pleroma-dev:matrix.org> for assistance. If you want to change default options in your Pleroma package, please **discuss it with us first**.
### Docker
-While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://github.com/sn0w/pleroma-docker>.
+While we don’t provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.
### Dependencies
diff --git a/config/emoji.txt b/config/emoji.txt
index 79246f239..200768ad1 100644
--- a/config/emoji.txt
+++ b/config/emoji.txt
@@ -1,30 +1,2 @@
firefox, /emoji/Firefox.gif, Gif,Fun
blank, /emoji/blank.png, Fun
-f_00b, /emoji/f_00b.png
-f_00b11b, /emoji/f_00b11b.png
-f_00b33b, /emoji/f_00b33b.png
-f_00h, /emoji/f_00h.png
-f_00t, /emoji/f_00t.png
-f_01b, /emoji/f_01b.png
-f_03b, /emoji/f_03b.png
-f_10b, /emoji/f_10b.png
-f_11b, /emoji/f_11b.png
-f_11b00b, /emoji/f_11b00b.png
-f_11b22b, /emoji/f_11b22b.png
-f_11h, /emoji/f_11h.png
-f_11t, /emoji/f_11t.png
-f_12b, /emoji/f_12b.png
-f_21b, /emoji/f_21b.png
-f_22b, /emoji/f_22b.png
-f_22b11b, /emoji/f_22b11b.png
-f_22b33b, /emoji/f_22b33b.png
-f_22h, /emoji/f_22h.png
-f_22t, /emoji/f_22t.png
-f_23b, /emoji/f_23b.png
-f_30b, /emoji/f_30b.png
-f_32b, /emoji/f_32b.png
-f_33b, /emoji/f_33b.png
-f_33b00b, /emoji/f_33b00b.png
-f_33b22b, /emoji/f_33b22b.png
-f_33h, /emoji/f_33h.png
-f_33t, /emoji/f_33t.png
diff --git a/docs/config.md b/docs/config.md
index 02f86dc16..50d6bfed4 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -25,7 +25,7 @@ At this time, write CNAME to CDN in public_endpoint.
## Pleroma.Upload.Filter.Mogrify
-* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"impode", "1"}]`.
+* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
## Pleroma.Upload.Filter.Dedupe
diff --git a/docs/config/howto_mediaproxy.md b/docs/config/howto_mediaproxy.md
index ed70c3ed4..16c40c5db 100644
--- a/docs/config/howto_mediaproxy.md
+++ b/docs/config/howto_mediaproxy.md
@@ -1,8 +1,8 @@
# How to activate mediaproxy
## Explanation
-Without the `mediaproxy` function, Pleroma don't store any remote content like pictures, video etc. locally. So every time you open Pleroma, the content is loaded from the source server, from where the post is coming. This can result in slowly loading content or/and increased bandwidth usage on the source server.
-With the `mediaproxy` function you can use the cache ability of nginx, to cache these content, so user can access it faster, cause it's loaded from your server.
+Without the `mediaproxy` function, Pleroma doesn't store any remote content like pictures, video etc. locally. So every time you open Pleroma, the content is loaded from the source server, from where the post is coming. This can result in slowly loading content or/and increased bandwidth usage on the source server.
+With the `mediaproxy` function you can use nginx to cache this content, so users can access it faster, because it's loaded from your server.
## Activate it
diff --git a/lib/pleroma/web/activity_pub/views/object_view.ex b/lib/pleroma/web/activity_pub/views/object_view.ex
index 6028b773c..94d05f49b 100644
--- a/lib/pleroma/web/activity_pub/views/object_view.ex
+++ b/lib/pleroma/web/activity_pub/views/object_view.ex
@@ -66,8 +66,10 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do
"orderedItems" => items
}
- if offset < total do
+ if offset + length(items) < total do
Map.put(map, "next", "#{iri}?page=#{page + 1}")
+ else
+ map
end
end
end
diff --git a/priv/static/emoji/f_00b.png b/priv/static/emoji/f_00b.png
deleted file mode 100644
index 3d00b89b0..000000000
--- a/priv/static/emoji/f_00b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_00b11b.png b/priv/static/emoji/f_00b11b.png
deleted file mode 100644
index 3e99ce464..000000000
--- a/priv/static/emoji/f_00b11b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_00b33b.png b/priv/static/emoji/f_00b33b.png
deleted file mode 100644
index 8f4929297..000000000
--- a/priv/static/emoji/f_00b33b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_00h.png b/priv/static/emoji/f_00h.png
deleted file mode 100644
index ba3da57c6..000000000
--- a/priv/static/emoji/f_00h.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_00t.png b/priv/static/emoji/f_00t.png
deleted file mode 100644
index 31d98b433..000000000
--- a/priv/static/emoji/f_00t.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_01b.png b/priv/static/emoji/f_01b.png
deleted file mode 100644
index 7bd2582c5..000000000
--- a/priv/static/emoji/f_01b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_03b.png b/priv/static/emoji/f_03b.png
deleted file mode 100644
index 9e4ff1bf7..000000000
--- a/priv/static/emoji/f_03b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_10b.png b/priv/static/emoji/f_10b.png
deleted file mode 100644
index 67c6493fc..000000000
--- a/priv/static/emoji/f_10b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_11b.png b/priv/static/emoji/f_11b.png
deleted file mode 100644
index b53328ba9..000000000
--- a/priv/static/emoji/f_11b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_11b00b.png b/priv/static/emoji/f_11b00b.png
deleted file mode 100644
index c4c30e11f..000000000
--- a/priv/static/emoji/f_11b00b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_11b22b.png b/priv/static/emoji/f_11b22b.png
deleted file mode 100644
index 47425e06e..000000000
--- a/priv/static/emoji/f_11b22b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_11h.png b/priv/static/emoji/f_11h.png
deleted file mode 100644
index 28342363a..000000000
--- a/priv/static/emoji/f_11h.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_11t.png b/priv/static/emoji/f_11t.png
deleted file mode 100644
index dca67dc70..000000000
--- a/priv/static/emoji/f_11t.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_12b.png b/priv/static/emoji/f_12b.png
deleted file mode 100644
index 9925adb7c..000000000
--- a/priv/static/emoji/f_12b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_21b.png b/priv/static/emoji/f_21b.png
deleted file mode 100644
index aa56d2cb2..000000000
--- a/priv/static/emoji/f_21b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_22b.png b/priv/static/emoji/f_22b.png
deleted file mode 100644
index 426878986..000000000
--- a/priv/static/emoji/f_22b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_22b11b.png b/priv/static/emoji/f_22b11b.png
deleted file mode 100644
index 4bdfb3107..000000000
--- a/priv/static/emoji/f_22b11b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_22b33b.png b/priv/static/emoji/f_22b33b.png
deleted file mode 100644
index adf94f811..000000000
--- a/priv/static/emoji/f_22b33b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_22h.png b/priv/static/emoji/f_22h.png
deleted file mode 100644
index 3b27e2de8..000000000
--- a/priv/static/emoji/f_22h.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_22t.png b/priv/static/emoji/f_22t.png
deleted file mode 100644
index addd9fec7..000000000
--- a/priv/static/emoji/f_22t.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_23b.png b/priv/static/emoji/f_23b.png
deleted file mode 100644
index beb69ab36..000000000
--- a/priv/static/emoji/f_23b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_30b.png b/priv/static/emoji/f_30b.png
deleted file mode 100644
index 41dbb2a5d..000000000
--- a/priv/static/emoji/f_30b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_32b.png b/priv/static/emoji/f_32b.png
deleted file mode 100644
index d8261e8a8..000000000
--- a/priv/static/emoji/f_32b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_33b.png b/priv/static/emoji/f_33b.png
deleted file mode 100644
index 71b8b914a..000000000
--- a/priv/static/emoji/f_33b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_33b00b.png b/priv/static/emoji/f_33b00b.png
deleted file mode 100644
index 65b6e24b8..000000000
--- a/priv/static/emoji/f_33b00b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_33b22b.png b/priv/static/emoji/f_33b22b.png
deleted file mode 100644
index d71a8ddd4..000000000
--- a/priv/static/emoji/f_33b22b.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_33h.png b/priv/static/emoji/f_33h.png
deleted file mode 100644
index e141c5184..000000000
--- a/priv/static/emoji/f_33h.png
+++ /dev/null
Binary files differ
diff --git a/priv/static/emoji/f_33t.png b/priv/static/emoji/f_33t.png
deleted file mode 100644
index d5a23073d..000000000
--- a/priv/static/emoji/f_33t.png
+++ /dev/null
Binary files differ
diff --git a/test/support/factory.ex b/test/support/factory.ex
index c751546ce..8f638b98f 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -182,8 +182,8 @@ defmodule Pleroma.Factory do
}
end
- def like_activity_factory do
- note_activity = insert(:note_activity)
+ def like_activity_factory(attrs \\ %{}) do
+ note_activity = attrs[:note_activity] || insert(:note_activity)
object = Object.normalize(note_activity)
user = insert(:user)
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 40344f17e..251055ee1 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -180,18 +180,65 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
describe "/object/:uuid/likes" do
- test "it returns the like activities in a collection", %{conn: conn} do
+ setup do
like = insert(:like_activity)
like_object_ap_id = Object.normalize(like).data["id"]
- uuid = String.split(like_object_ap_id, "/") |> List.last()
+ uuid =
+ like_object_ap_id
+ |> String.split("/")
+ |> List.last()
+
+ [id: like.data["id"], uuid: uuid]
+ end
+
+ test "it returns the like activities in a collection", %{conn: conn, id: id, uuid: uuid} do
result =
conn
|> put_req_header("accept", "application/activity+json")
|> get("/objects/#{uuid}/likes")
|> json_response(200)
- assert List.first(result["first"]["orderedItems"])["id"] == like.data["id"]
+ assert List.first(result["first"]["orderedItems"])["id"] == id
+ assert result["type"] == "OrderedCollection"
+ assert result["totalItems"] == 1
+ refute result["first"]["next"]
+ end
+
+ test "it does not crash when page number is exceeded total pages", %{conn: conn, uuid: uuid} do
+ result =
+ conn
+ |> put_req_header("accept", "application/activity+json")
+ |> get("/objects/#{uuid}/likes?page=2")
+ |> json_response(200)
+
+ assert result["type"] == "OrderedCollectionPage"
+ assert result["totalItems"] == 1
+ refute result["next"]
+ assert Enum.empty?(result["orderedItems"])
+ end
+
+ test "it contains the next key when likes count is more than 10", %{conn: conn} do
+ note = insert(:note_activity)
+ insert_list(11, :like_activity, note_activity: note)
+
+ uuid =
+ note
+ |> Object.normalize()
+ |> Map.get(:data)
+ |> Map.get("id")
+ |> String.split("/")
+ |> List.last()
+
+ result =
+ conn
+ |> put_req_header("accept", "application/activity+json")
+ |> get("/objects/#{uuid}/likes?page=1")
+ |> json_response(200)
+
+ assert result["totalItems"] == 11
+ assert length(result["orderedItems"]) == 10
+ assert result["next"]
end
end