GET /api/v1/conversations?max_id=xxx results in an error
Seems very similar to #1162 (closed) but the traceback is slightly different.
See also: https://gitlab.com/soapbox-pub/soapbox-fe/-/issues/77
GET http://localhost:3036/api/v1/conversations?max_id=9v5joKZ0qSDmHweG8G
causes this traceback:
** (Ecto.Query.CastError) lib/pleroma/pagination.ex:112: value `"9v5joKZ0qSDmHweG8G"` in `where` cannot be cast to type :id in query:
from p0 in Pleroma.Conversation.Participation,
where: p0.user_id == ^"9v5bmRalQvjOy0ECcC",
where: p0.id < ^"9v5joKZ0qSDmHweG8G",
order_by: [desc: p0.updated_at],
order_by: [asc: fragment("? desc nulls last", p0.id)],
limit: ^20,
select: p0,
preload: [conversation: [:users]]
(elixir 1.10.2) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir 1.10.2) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.10.2) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.10.2) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
(ecto 3.3.3) lib/ecto/repo/queryable.ex:176: Ecto.Repo.Queryable.execute/4
(ecto 3.3.3) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
(pleroma 2.0.5-6-ga36eb5ea-plerasstodon+dev) lib/pleroma/pagination.ex:40: Pleroma.Pagination.fetch_paginated/4
(pleroma 2.0.5-6-ga36eb5ea-plerasstodon+dev) lib/pleroma/conversation/participation.ex:165: Pleroma.Conversation.Participation.for_user_with_last_activity_id/2
(pleroma 2.0.5-6-ga36eb5ea-plerasstodon+dev) lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:23: Pleroma.Web.MastodonAPI.ConversationController.index/2
(pleroma 2.0.5-6-ga36eb5ea-plerasstodon+dev) lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:5: Pleroma.Web.MastodonAPI.ConversationController.action/2
(pleroma 2.0.5-6-ga36eb5ea-plerasstodon+dev) lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:5: Pleroma.Web.MastodonAPI.ConversationController.phoenix_controller_pipeline/2