From f77bb28683e323345a7add424dde3a5c04e28bf7 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Fri, 1 Nov 2024 17:02:03 +0300 Subject: [PATCH] Add helper AddThreadMessageText --- pachca.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pachca.go b/pachca.go index 75f2301..1e39883 100644 --- a/pachca.go +++ b/pachca.go @@ -1541,6 +1541,11 @@ func (c *Client) AddThreadMessage(messageID uint64, message *MessageRequest) (*M return c.AddMessage(message) } +// AddThreadMessageText helper to create thread and add new message with given text to it +func (c *Client) AddThreadMessageText(messageID uint64, text string) (*Message, error) { + return c.AddThreadMessage(messageID, &MessageRequest{Content: text}) +} + // FILES //////////////////////////////////////////////////////////////////////////// // // UploadFile uploads new file and returns key of it