foamrider / osticket-telegram

Post notifications from osTicket to Telegram with Telegram Bot
MIT License
31 stars 24 forks source link

More data and update in message #3

Closed mcphisto1979 closed 8 years ago

mcphisto1979 commented 8 years ago

Hi, I'm a very beginner with PHP code. Just wanted to ask, if and how I can modify your wonderful plugin, to receive the message even when a ticket is modified or updated. Is there a way to receive even phone number and the text of the ticket in notification message?

Thank you.

foamrider commented 8 years ago

Unfortunately adding a hook for update/modify event is limited by osTicket. Until they implement a better API, it only works on ticket creation.

For adding more details from a ticket, you can experiment with $ticket-getBody() and $ticket-getPhoneNumber() (haven't tested these). Such functions isn't documented either.

mcphisto1979 commented 8 years ago

Hi, thank you. Already tried with getPhoneNumber(), no errors, but I don't get phone number in telegram. With getBody(), I get a 500 error after opening the ticket.