Can't message yourself in a chat (but can start it)
This is the error you get when sending a message to yourself:
pleroma | 19:34:51.532 request_id=FkAY8S4oH-2YxHEAADEC [error] Internal server error: %Ecto.ConstraintError{constraint: "chat_message_references_object_id_chat_id_index", message: "constraint error when attempting to insert struct:\n\n * chat_message_references_object_id_chat_id_index (unique_constraint)\n\nIf you would like to stop this constraint violation from raising an\nexception and instead add it as an error to your changeset, please\ncall `unique_constraint/3` on your changeset with the constraint\n`:name` as an option.\n\nThe changeset has not defined any constraint.\n", type: :unique}
pleroma |
pleroma | 19:34:51.532 request_id=FkAY8S4oH-2YxHEAADEC [info] Converted error Ecto.ConstraintError to 500 response
pleroma |
pleroma | 19:34:51.534 [error] #PID<0.15080.0> running Pleroma.Web.Endpoint (connection #PID<0.11083.0>, stream id 148) terminated
pleroma | Server: piggo.space:80 (http)
pleroma | Request: POST /api/v1/pleroma/chats/A0Od55Ly2VuawkVsMi/messages
pleroma | ** (exit) an exception was raised:
pleroma | ** (Ecto.ConstraintError) constraint error when attempting to insert struct:
pleroma |
pleroma | * chat_message_references_object_id_chat_id_index (unique_constraint)
pleroma |
pleroma | If you would like to stop this constraint violation from raising an
pleroma | exception and instead add it as an error to your changeset, please
pleroma | call `unique_constraint/3` on your changeset with the constraint
pleroma | `:name` as an option.
pleroma |
pleroma | The changeset has not defined any constraint.
pleroma |
pleroma | (ecto) lib/ecto/repo/schema.ex:700: anonymous fn/4 in Ecto.Repo.Schema.constraints_to_errors/3
pleroma | (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
pleroma | (ecto) lib/ecto/repo/schema.ex:685: Ecto.Repo.Schema.constraints_to_errors/3
pleroma | (ecto) lib/ecto/repo/schema.ex:666: Ecto.Repo.Schema.apply/4
pleroma | (ecto) lib/ecto/repo/schema.ex:263: anonymous fn/15 in Ecto.Repo.Schema.do_insert/4
pleroma | (pleroma) lib/pleroma/web/activity_pub/side_effects.ex:313: anonymous fn/3 in Pleroma.Web.ActivityPub.SideEffects.handle_object_creation/2
pleroma | (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
pleroma | (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
the empty chat then shows in the list, though