From a7d2551dcf72c354010badcce7b6649dca77b9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B0=D1=88=D0=B5=20=D0=98=D0=BC=D1=8F?= Date: Mon, 6 Apr 2026 00:12:42 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=D0=BA=D0=B0=D1=8F=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=D1=8B=D1=85=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9,=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=BE=D1=81=D0=B0=D1=8F=20=D0=BA=D1=80=D0=B8?= =?UTF-8?q?=D0=B2=D0=B0=D1=8F=20=D0=BD=D0=BE=20=D0=BF=D0=BE=D1=85=D1=83?= =?UTF-8?q?=D0=B9=20=D1=8F=20=D1=81=D0=BF=D0=B0=D1=82=D1=8C=20=D1=85=D0=BE?= =?UTF-8?q?=D1=87=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/backend/modules/messages.dart | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/backend/modules/messages.dart b/lib/backend/modules/messages.dart index 483cd94..61a2dbb 100644 --- a/lib/backend/modules/messages.dart +++ b/lib/backend/modules/messages.dart @@ -180,8 +180,22 @@ class MessagesModule { ); } - Future sendMessage(int accountId, int chatId, String text) async { - final payload = {'chatId': chatId, 'text': text}; + Future sendMessage( + int accountId, + int chatId, + String text, { + bool notify = true, + }) async { + final payload = { + 'chatId': chatId, + 'message': { + 'text': text, + 'cid': DateTime.now().millisecondsSinceEpoch * -1, + 'elements': [], + 'attaches': [], + }, + 'notify': notify, + }; await _api.sendRequest(Opcode.msgSend, payload); }