2024-08-17 23:26:56 +03:00
|
|
|
Image = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg";
|
2024-08-13 14:04:54 +00:00
|
|
|
OPI_TypeConversion.GetBinaryData(Image);
|
|
|
|
|
|
|
|
B64Image = GetBase64StringFromBinaryData(Image);
|
|
|
|
|
|
|
|
MembersArray = New Array;
|
|
|
|
MembersArray.Add(10);
|
|
|
|
MembersArray.Add(1);
|
|
|
|
|
|
|
|
ChatStructure = New Structure;
|
|
|
|
ChatStructure.Insert("TYPE" , "OPEN");
|
|
|
|
ChatStructure.Insert("TITLE" , "New chat");
|
|
|
|
ChatStructure.Insert("DESCRIPTION", "This is a new chat");
|
|
|
|
ChatStructure.Insert("COLOR" , "GREEN");
|
|
|
|
ChatStructure.Insert("MESSAGE" , "Welcome to new chat");
|
|
|
|
ChatStructure.Insert("USERS" , MembersArray);
|
|
|
|
ChatStructure.Insert("AVATAR" , B64Image);
|
|
|
|
ChatStructure.Insert("OWNER_ID" , 1);
|
|
|
|
|
2024-08-17 23:26:56 +03:00
|
|
|
URL = "https://b24-ar17wx.bitrix24.by/rest/1/ztbe...";
|
2024-08-13 14:04:54 +00:00
|
|
|
|
|
|
|
Result = OPI_Bitrix24.CreateChat(URL, ChatStructure);
|
|
|
|
|
2024-08-13 17:25:31 +03:00
|
|
|
URL = "b24-ar17wx.bitrix24.by";
|
2024-08-17 23:26:56 +03:00
|
|
|
Token = "c03fa966006e9f06006b12e400000001000...";
|
2024-08-13 14:04:54 +00:00
|
|
|
|
|
|
|
ChatStructure = New Structure;
|
|
|
|
ChatStructure.Insert("TYPE" , "CHAT");
|
|
|
|
ChatStructure.Insert("TITLE" , "Private chat");
|
|
|
|
ChatStructure.Insert("USERS" , MembersArray);
|
|
|
|
|
|
|
|
Result = OPI_Bitrix24.CreateChat(URL, ChatStructure, Token);
|