LiveHelperChat / osTicket

osTicket extension for Live Helper Chat
27 stars 21 forks source link

Chat attachments on created ticket #15

Open fernandogiacomino opened 2 years ago

fernandogiacomino commented 2 years ago

Hi Remigijus! I ca'nt find the way to send offline chat attachments to new created ticket in osTicket. How to take LHC attachments ($chat->attachments ???) and send with $data to osTicket api.

$data = array( ‘name’ => $name, ’email’ => $email, (...) ‘attachments’ => array() );

remdex commented 2 years ago

If you are talking about about attachments related to specific file you can just use

erLhcoreClassModelChatFile::getList(['filter' => ['chat_id' => $chat->id]])

and then file_get_contents($file->file_path_server);

fernandogiacomino commented 2 years ago

Yes, I'm trying to send files attached to the chat, to osTicket. But I can't find the way to use that code...