feat(contacts): отправка контактов вложением

This commit is contained in:
klockky
2026-07-26 15:49:15 +03:00
parent b3f4418890
commit 90ca80431d
10 changed files with 328 additions and 4 deletions
+20
View File
@@ -1613,6 +1613,26 @@ class MessagesModule {
return _sentMessageMap(response);
}
Future<Map<String, dynamic>?> sendContactMessage(
int chatId,
int contactId, {
bool notify = true,
}) async {
final payload = {
'chatId': chatId,
'message': {
'cid': DateTime.now().millisecondsSinceEpoch * -1,
'attaches': [
{'_type': 'CONTACT', 'contactId': contactId},
],
},
'notify': notify,
};
final response = await _api.sendRequest(Opcode.msgSend, payload);
return _sentMessageMap(response);
}
static const int _pollAnonymousFlag = 4;
static const int _pollMultipleFlag = 1;