From 7058cac1c2eeb46ef6e95b6af863c931f8d38f06 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 22 Oct 2020 10:56:17 +0000 Subject: Merge branch '2257-self-chat' into 'develop' Resolve "Can't message yourself in a chat (but can start it)" Closes #2257 See merge request pleroma/pleroma!3099 --- test/pleroma/web/common_api_test.exs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 64476a099..c5b90ad84 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -95,6 +95,20 @@ defmodule Pleroma.Web.CommonAPITest do describe "posting chat messages" do setup do: clear_config([:instance, :chat_limit]) + test "it posts a self-chat" do + author = insert(:user) + recipient = author + + {:ok, activity} = + CommonAPI.post_chat_message( + author, + recipient, + "remember to buy milk when milk truk arive" + ) + + assert activity.data["type"] == "Create" + end + test "it posts a chat message without content but with an attachment" do author = insert(:user) recipient = insert(:user) -- cgit v1.2.3