Giter Site home page Giter Site logo

livehelperchat / telegram Goto Github PK

View Code? Open in Web Editor NEW
43.0 10.0 30.0 532 KB

This extension allow have support for telegram bot support directly in Live Helper Chat. It support sound messages, images, files. You can also use Telegram as support client :)

PHP 100.00%

telegram's Introduction

Telegram bot integration

This extension allows for direct support of Telegram bots in Live Helper Chat. It supports sound messages, images, and files.

Requirements

Minimum version required: Live Helper Chat 4.27v.

Upgrading

  1. Run the command php cron.php -s site_admin -e lhctelegram -c cron/update_structure
  2. Navigate to the Telegram options and activate the configuration.

Integration tips

  1. By default, HTML markdown is used for messages.
  2. You can enable debug mode by unchecking the Skip option for the TelegramIntegration bot.
  3. If you don't want HTML or Markdown support, you can edit the Rest API call by removing "parse_mode":"HTML", and change {{msg_html_nobr}} to {{msg_url}}.
  4. In parse mode "HTML" not all tags are supported so don't use bbcode which translates to HTML which is not supported by telegram. You can always debug in Rest API enabling debug trigger. So you should have different bot or messages depending whom you are sending message. Telegram client or web widget.

Installation instructions

  1. Clone the GitHub repository.
  2. Rename the cloned folder to "lhctelegram" and place it in the "extension/" directory.
  3. Activate the extension by adding 'lhctelegram' to the 'extensions' array in the lhc_web/settings/settings.ini.php file.
'extensions' => 
    array (          
        'lhctelegram'
    ),
  1. Install the composer requirements by running:
cd extension/lhctelegram && composer.phar update
  1. Clean the cache in the Live Helper Chat back office.
  2. Execute the doc/install.sql on the database manager or run the command:
    php cron.php -s site_admin -e lhctelegram -c cron/update_structure
    
  3. Register your bot with BotFather: https://core.telegram.org/bots#6-botfather
  4. In the Telegram options, activate webhook configurations.
  5. Create a bot in the LHC back office under Modules => Telegram Settings.
  6. After creating the bot, click "Set webhook".
  7. That's it! The integration should be set up.

Using Telegram as a Support Client

This feature allows you to use the Telegram bot as a gateway between chats on your website and your operators. Here's an example setup:

Example of final setup. Each customer get's it's own topic. and you can use telegram to chat with your customers directly. Files are also supported!

Watch YouTube video

Watch the video

Instructions

  1. After you have completed the above steps, you have to do the following changes: In LHC back office, go back to the bot editing page and choose the departments tab. Check the departments you want to receive new chats notifications for but don't save yet.
  2. Create a group chat in telegram and add your bot as an admin in the group chat.
  3. Modify group chat settings and enable topics. Each customer will get their own topic.
  4. Create a dummy topic, send a dummy message, and copy the URL.
  5. Your link will look like https://t.me/c/1634340846/3/4, and your group ID will be the middle number 1634340846 with the appended -100, so it will be like -1001634340846 as a concatenated string of -100 + 1634340846.
  6. In the LHC back office, go to the main Telegram page, then to Telegram bots > Edit bot departments. Copy-paste the Telegram group ID into the Group Chat ID field. In the same tab, check the This bot acts as a client box. Now save.
  7. Go to the LHC back office main Telegram page and choose Telegram operators. Choose Operator and Bot, or create one.
  8. Start a conversation in Telegram and register yourself within the bot by typing /register <id>. The <id> should be the registered operator id from the very first column in the operators list in LHC Modules => Telegram Settings => Telegram operators.
  9. If you get an error message saying it can't find an operator with that ID, and the operator was just created, clean the cache (https://onlinehelpguide.com/delete-telegram-cache-files/) and start a chat as that operator using just the website (not Telegram). Then try registering the again. It should work now.
  10. That's all. Just type /help to see what available commands are supported.

General tips

  • If you are planning only to use Telegram to support your site visitors, it makes sense to set up department online hours so the widget will remain always online even if you are not using the default web back office.
  • For a chat to be accepted by the first message from Telegram, you have to be in Visible status.
  • You can listen for a /start command by defining event listener with keyword /start. The Same way you can listen to any other command.
  • Same visitor chats are written to the same topic as long Online Visitor record exists. You can extend it to be valid for one year in Settings -> Chat configuration -> Online tracking -> How many days keep records of online users.
  • Integration supports quick reply buttons. Using these, you can make a quick navigation.
  • Telegram API has limit of 20MB per file size limit. Please make sure you set the appropriate limit in lhc files sections.

Since version 3.36v, you can set your online condition to Always online, and you won't have to do anything else.

https://livehelperchat.com/how-to-use-telegram-if-you-are-automated-hosting-client-489a.html

telegram's People

Contributors

binbard avatar jasonfun888 avatar leancode avatar mysubcult avatar remdex avatar thibault-collard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram's Issues

I don't receive any messages

After i fixed and installed composer i was able to webhook, and i created the bot, but when somesone send a message from site, i don't receive any message on telegram from the bot

ps i noticed some commands work, i got only these...
Commands List:
/cancel - Cancel the currently active conversation
/date - Show date/time by location
/echo - Show text
/editmessage - Edit message
/forcereply - Force reply with reply markup
/help - Show bot commands help
/hidekeyboard - Hide the custom keyboard
/image - Send Image
/inlinekeyboard - Show inline keyboard
/keyboard - Show a custom keyboard with reply markup
/markdown - Print Markdown text
/shortener - Botan Shortener example
/slap - Slap someone with their username
/survey - Survery for bot users
/weather - Show weather by location
/whoami - Show your id, name and username

For exact command help type: /help

chat from lhc to telegram

Hi, i've a question....
is it possibile start a chat from lhc to a telegram number?
Thank you
Antonella

Compatibility with facebook plugin

Hello,
Telegram plugin doesn't work with facebook messenger plugin. I have installed both extensions and they work. But when someone sends a message to my facebook page, I receive it on telegram but when I reply, the user doesn't receive anything. Is this a bug? If not, can you make them work with each other?

Pictures and another attached files

Operator can send picture by the Telegram client via bot and website widget can show this picture to visitor, but if visitor will send photo or any another type of file to operator in Telegram client we can't see the picture or any files, only file ID.

Personal canned messages

I'am add "Personal canned message" and set option "Automatically send this message to user then chat is accepted".

Canned message do not send to user after accept chat from Telegram. Please help me.

Webhook setup step failing

Hi currently I run livehelper chat in docker compose with nodejs (just as described on doc pages) I try to install telegram module, all is going smoth until last step with webhook. all I get is
"Webhook was not set! Error: 400 Bad Request: bad webhook: HTTPS url must be provided for webhook"
error.
docker is behind my nginx proxy with https.
I believe there is an issue with
<a title="http://myurlhere/telegram/callback/2" href="/site_admin/telegram/setwebhook/2" class="btn btn-xs btn-info">Set webhook</a> block. Can you please provide any help here?

MySQL - default value

When I try to add a new bot, I get this error:

A query failed internally in Persistent Object: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value Query: 'INSERT INTO lhc_telegram_bot ( bot_username, webhook_set, bot_api, dep_id, bot_client, chat_timeout, bot_disabled ) VALUES ( :ezcValue1, :ezcValue2, :ezcValue3, :ezcValue4, :ezcValue5, :ezcValue6, :ezcValue7 )'

telegram as the operator's own channel

Is it possible to use the telegram as the operator's own channel? would be useful to provide emergency support in cases out of hours when the operator was not on the computer. Does the LHC have anything that might work like this?

Can I Let LiveHelperChat using the webhook on different server?

Hi,

I got error of (Webhook was not set! Error: 400 Bad Request: bad webhook: HTTPS url must be provided for webhook) when I try to set webhook as I am currently hosting livehelperchat on server that only serve HTTP. I try not to change the HTTP to HTTPS because of certain reason.

I have a different server which have HTTPS, let just call it https://myotherserver. So I thought by giving the same bot API token during
(1) setup the telegram bot on liveHelperChat and ;
(2) setting through telegram API (
https://api.telegram.org/bot bot API token /setWebHook?url=https://myOtherServer/hook )

, liveHelperChat will just letting me using the same webhook url as a callback url if the bot token are similar. But it does not work that way.

What I already did was call web request to;
https://api.telegram.org/botXXXXXXX/setWebHook?url=https://myOtherServer/hook

and manage to receive return the webhook URL by calling;
https://api.telegram.org/botXXXXXXX/getWebhookInfo

Please excuse my grammar.

Screenshot from 2020-06-07 14-51-48

Thank you in advance.

Group chat support

Hi,

I've configured lhc and telegram module fine, and have successfully everything working if I chat directly with the bot.
However I wish to setup a group chat with the bot. When I try to '/register ' the bot does not respond. I've tried making the bot an admin as well but this did not work either. The bot responds to '/register' with the help message

Any tips or advice on what I should do to make this work?

Cheers

Call to a member function getChat() on null

LHC version is from the master branch and telegram extension as well.

I use telegram plugin as a client as detailed in this guide: https://livehelperchat.com/how-to-use-telegram-if-you-are-automated-hosting-client-489a.html with working hours.

I see in audit logs some errors when getting callback from telegram for some reason:

Audit error log
{
    "message": "Call to a member function getChat() on null",
    "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/classes\/Commands\/GenericCommand.php",
    "line": 49,
    "server": {
        "USER": "www-data",
        "HOME": "\/var\/www",
        "HTTP_CF_CONNECTING_IP": "1.2.3.4",
        "HTTP_CONTENT_TYPE": "application\/json",
        "HTTP_CF_VISITOR": "{\"scheme\":\"https\"}",
        "HTTP_CF_RAY": "XXX-AMS",
        "HTTP_ACCEPT_ENCODING": "gzip",
        "HTTP_CDN_LOOP": "cloudflare",
        "HTTP_CF_IPCOUNTRY": "NL",
        "HTTP_CONTENT_LENGTH": "552",
        "HTTP_X_FORWARDED_FOR": "1.2.3.4, 1.2.3.4",
        "HTTP_X_REAL_IP": "1.2.3.4",
        "HTTP_HOST": "chat.domain.com",
        "HTTP_X_FORWARDED_PROTO": "https",
        "REDIRECT_STATUS": "200",
        "HTTPS": "on",
        "SERVER_NAME": "chat.domain.com",
        "SERVER_PORT": "80",
        "SERVER_ADDR": "192.168.30.16",
        "REMOTE_PORT": "",
        "REMOTE_ADDR": "1.2.3.4",
        "SERVER_SOFTWARE": "nginx",
        "GATEWAY_INTERFACE": "CGI\/1.1",
        "SERVER_PROTOCOL": "HTTP\/1.1",
        "DOCUMENT_ROOT": "\/var\/www\/chat.domain.com\/htdocs",
        "DOCUMENT_URI": "\/index.php",
        "REQUEST_URI": "\/telegram\/callback\/1",
        "SCRIPT_NAME": "\/index.php",
        "SCRIPT_FILENAME": "\/var\/www\/chat.domain.com\/htdocs\/index.php",
        "CONTENT_LENGTH": "552",
        "CONTENT_TYPE": "application\/json",
        "REQUEST_METHOD": "POST",
        "QUERY_STRING": "telegram\/callback\/1",
        "FCGI_ROLE": "RESPONDER",
        "PHP_SELF": "\/index.php",
        "REQUEST_TIME_FLOAT": 1680613239.40077,
        "REQUEST_TIME": 1680613239
    },
    "trace": [
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/vendor\/longman\/telegram-bot\/src\/Commands\/Command.php",
            "line": 173,
            "function": "execute",
            "class": "Longman\\TelegramBot\\Commands\\SystemCommands\\GenericCommand",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/vendor\/longman\/telegram-bot\/src\/Telegram.php",
            "line": 494,
            "function": "preExecute",
            "class": "Longman\\TelegramBot\\Commands\\Command",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/vendor\/longman\/telegram-bot\/src\/Telegram.php",
            "line": 485,
            "function": "executeCommand",
            "class": "Longman\\TelegramBot\\Telegram",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/vendor\/longman\/telegram-bot\/src\/Telegram.php",
            "line": 462,
            "function": "executeCommand",
            "class": "Longman\\TelegramBot\\Telegram",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/vendor\/longman\/telegram-bot\/src\/Telegram.php",
            "line": 388,
            "function": "processUpdate",
            "class": "Longman\\TelegramBot\\Telegram",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/modules\/lhtelegram\/callback.php",
            "line": 66,
            "function": "handle",
            "class": "Longman\\TelegramBot\\Telegram",
            "type": "->"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/lib\/core\/lhcore\/lhmodule.php",
            "line": 108,
            "args": [
                "\/var\/www\/chat.domain.com\/lhc_web\/extension\/lhctelegram\/modules\/lhtelegram\/callback.php"
            ],
            "function": "include"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/lib\/core\/lhcore\/lhmodule.php",
            "line": 658,
            "function": "runModule",
            "class": "erLhcoreClassModule",
            "type": "::"
        },
        {
            "file": "\/var\/www\/chat.domain.com\/lhc_web\/index.php",
            "line": 50,
            "function": "moduleInit",
            "class": "erLhcoreClassModule",
            "type": "::"
        }
    ]
}

Unable to reply chat from telegram

Hi,

I have followed the steps on https://www.youtube.com/watch?v=wObbEaeopRU . I am not getting the telegram chat ID or group ID when clicking on set webhook on Telegram settings - Operators. The chats are reaching the telegram bot normally but I am unable to reply through Telegram. Attaching the recent audit log for reference.

[400]Bad Request: the chat is not a forum-#0 /var/www/clients/client1/web1/web/livehelp/lib/core/lhchat/lhchateventdispatcher.php(70): erLhcoreClassExtensionLhctelegram->chatStarted()
#1 /var/www/clients/client1/web1/web/livehelp/cache/compiledtemplates/9da08037756b087e04d803bee2783869.php(11): erLhcoreClassChatEventDispatcher->dispatch()
#2 /var/www/clients/client1/web1/web/livehelp/lib/core/lhcore/lhmodule.php(108): include('...')
#3 /var/www/clients/client1/web1/web/livehelp/lib/core/lhcore/lhmodule.php(658): erLhcoreClassModule::runModule()
#4 /var/www/clients/client1/web1/web/livehelp/index.php(53): erLhcoreClassModule::moduleInit()
#5 {main}

Error 500

captura realizada el 2018-01-30 14 58 56
SO Versión: CentOS 7.4.1708
Database System and Version: mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
PHP Version: 5.5.38
LHC version: 2.84
Error:
[Tue Jan 30 14:49:34.638217 2018] [:error] [pid 18683] [client X.X.X.X] PHP Warning: include_once(): Failed opening 'extension/lhctelegram/vendor/autoload.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/extension/lhctelegram/bootstrap/bootstrap.php on line 11

Error for this extension due to lack of * autoload.php * folder on vendor directory ....

Hello! Something is missing from the folders structure ...
Running the cron with this command:
php cron.php -s site_admin -e lhctelegram -c cron/update_structure

i have the eeror below...

`
root@s1:/home/xxxx/web/xxxx/public_html# php cron.php -s site_admin -e lhctelegram -c cron/update_structure
Unexpected error, the message was : include_once(extension/lhctelegram/vendor/autoload.php): failed to open stream: No such file or directory in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12
PHP Warning: include_once(extension/lhctelegram/vendor/autoload.php): failed to open stream: No such file or directory in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12

Warning: include_once(extension/lhctelegram/vendor/autoload.php): failed to open stream: No such file or directory in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12
Unexpected error, the message was : include_once(): Failed opening 'extension/lhctelegram/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12
PHP Warning: include_once(): Failed opening 'extension/lhctelegram/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12

Warning: include_once(): Failed opening 'extension/lhctelegram/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /home/xxxx/web/xxxx/public_html/extension/lhctelegram/bootstrap/bootstrap.php on line 12
No queries to execute found

`

In the vendor folder there are no files like ' autoload.php ' to which the bootstrap.php file refers to line 12 in the error I presented above ... Something got lost along the way

Support for Long Pooling

Hi,
I try to use it Test server, before uploading to production, but access from outside is closed. Because of this, i think, I receive error:

"Telegram returned an invalid response! Please review your bot name and API key."

Unable to register user.

Hello,

I've successfully installed LHC with telegram extension and configured the bot and added the operator as well.

However, whenever I try to register the operator [ /register ] I get the following error : "Operator could not be found! Please create operator in back office first!"

When adding operator in LHC back office, there is no way to mention the telegram id of the operator.

Am I missing something and how do I get it running?

Thanks
Barinder

Track online users Telegram

Return agent message not available from Telegram, even when there are no agents online the messages enter.

Chat notification

Hello.
At first, thank you, for this extension.
I create following steps on my site with lhc:

  1. visitor open web site. Visit 3 pages.
  2. Bot open dialog and ask question. If answer was standart - bot reply.
  3. After first 3 questions chat transfered to operator.

Problem: i get notification in telegram when visitor open first page, before dialog with bot starts. For each visitor. But when chat transfered to operator I haven't any notification.

Operator Selection Improvements

Please put these on my bill.

In the "Edit Operator" page we'd like to have it show both first name and last name. Right now the Operator dropdown only shows the operators first name. As the number of operators in the system climbs they get harder to find.

image

composer.phar: command not found

Hi, Thanks for all your efforts but unfortunately the same as this post https://forum.livehelperchat.com/viewtopic.php?id=3253 I can't get any further with step 4. If I enter this here, I get a message every time that the command cannot be found:
cd extension/lhctelegram && composer.phar update

The message is:
composer.phar: command not found

Spending lots of time but cant get further, any help would be much appreciated!

Sort on Telegram operators page

Please put this on my bill.

We'd like this page to sort by bot and then operator. This would make operators easier to find.

image

Online operator and Telegram Bot

If the operator assigned to the Telegram bot is offline visitor can send message.
How to make the operator assigned to the Telegram bot always online?

Can't install telegram :(

I am not able to set webhook, when i click the button, it show a white page.
I am using nginx (proper configured with php) and it trow this error

2017/12/08 16:15:20 [error] 4838#4838: *127144 FastCGI sent in stderr: "PHP message: PHP Warning: include_once(extension/lhctelegram/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/sanitariacamporomano.com/livechat/extension/lhctelegram/bootstrap/bootstrap.php on line 11
PHP message: PHP Warning: include_once(): Failed opening 'extension/lhctelegram/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /var/www/sanitariacamporomano.com/livechat/extension/lhctelegram/bootstrap/bootstrap.php on line 11
PHP message: PHP Fatal error: Uncaught Error: Class 'Longman\TelegramBot\Telegram' not found in /var/www/sanitariacamporomano.com/livechat/cache/compiledtemplates/7b300af8797caa5a91c6de7fc757a64f.php:2
Stack trace:
#0 /var/www/sanitariacamporomano.com/livechat/lib/core/lhcore/lhmodule.php(96): include()
#1 /var/www/sanitariacamporomano.com/livechat/lib/core/lhcore/lhmodule.php(486): erLhcoreClassModule::runModule()
#2 /var/www/sanitariacamporomano.com/livechat/index.php(39): erLhcoreClassModule::moduleInit()
#3 {main}
thrown in /var/www/sanitariacamporomano.com/livechat/cache/compiledtemplates/7b300af8797caa5a91c6de7fc757a64f.php on line 2" while reading response header from upstream, client: 141.101.107.171, server: www.sanitariacamporomano.com, request: "GET /livechat/index.php/site_admin/telegram/setwebhook/1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "sanitariacamporomano.com"

error on new bot

Hi, thanks for adding telegram bot extension. I get this error on saving new telegram bot.

Could not fetch the persistent object definition for the class 'erLhcoreClassModelTelegramBot'. Searched for '/erlhcoreclassmodeltelegrambot.php'

I'm not familiar with php.
php ver 7.1.0

Self signed certificate

Posibility to upload and set self signed certificate:

$result = $telegram->setWebhook($hook_url, ['certificate' => '/path/to/certificate']);

And can you please specify, what token should lock like?
starts with prefix "bot" + "token" = "bot11111:123456789" or like = "11111:123456789"?
AND Bot username should be exact as in telergam? with '@' = @ABC_Bot
or not, like = ABC_Bot.

I ask because I receive an error:
Telegram returned an invalid response! Please review your bot name and API key.

[Feature] Support telegram group chats

Hi @remdex

Would be nice to be able to support group chats.

Why it's nice? - When you have multiple support agents and some of them are online or not they could reply directly in the group chat to the bot and give the user instant reply in the chat.

What basically needs to be done:

  • set-up a bot as usual
  • add the bot into the new telegram group
  • get group id (usually a negative id like -43434343434 something), you can get this group id by multiple methods, e.g. via getUpdates call
  • specify group id inside the settings of the bot
  • when someone quotes the bot message and gives a reply, reply goes to the user

What do you think?

Thanks!

Data to enter in form setting bot telegram

What are the values ​​to enter in the form to register the bot?
Inicio / Telegram / Telegram bots / Edit bot

a)bot username:
b) bot api:
in both cases, what are the values?

a)bot username:
bot username: @foo?

b) bot api:
bot's api token? no, it asks me for an https path
if I put:
1.- api token -> Error, required http / https
2.- https://api.telegram.org/botxxxxxxx/ -> 404 error
3.- Instead, if in a url, correctly place the values https://api.telegram.org/botxxxxxxx/getWebhookinfo, I run on a web browser deleteWebhook or https://api.telegram.org/botxxxxxxx/setWebhook and unregister the bot without problems. I get result after having performed setwebhook, or https://api.telegram.org/botxxxxxxx/setWebhook?url=https://yyyyy:8443/path
Register the bot without any problem.
4.-The field has a maximum of 50 characters, so the one url and the token overflows the capacity and truncates the sent value.
5.- Try all the methods in design mode altering the maxlength to of the "bot api" to 255 and "alter table" the field in the table of mysql for testing, in all cases the error was 404
6.- am testing with several bots that I have, without having done setWebhook in another way, the result is always the same.

What value is for fiel 'bot api' and 'bot username'?

Thank you all in advance for your time.

Do not send "Accept Chat" message to all operators

  1. Send "Accept Chat" button when operator is assigned to chat. And only to this operator.

  2. Also replace all sent "Accept Chat" buttons (related to this chat, different operators) to message like "Chat already accepted".

Maxlength in form to edit Telegram bot is incorrect

The form needs to be changed to match the recent database changes.

diff --git a/design/lhctelegramtheme/tpl/lhtelegram/parts/form.tpl.php b/design/lhctelegramtheme/tpl/lhtelegram/parts/form.tpl.php
index bfffda3..7ad5257 100644
--- a/design/lhctelegramtheme/tpl/lhtelegram/parts/form.tpl.php
+++ b/design/lhctelegramtheme/tpl/lhtelegram/parts/form.tpl.php
@@ -1,6 +1,6 @@
 <div class="form-group">
     <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Bot username');?>*</label>
-    <input type="text" maxlength="20" class="form-control" name="bot_username" value="<?php echo htmlspecialchars($item->bot_username)?>" />
+    <input type="text" maxlength="50" class="form-control" name="bot_username" value="<?php echo htmlspecialchars($item->bot_username)?>" />^M
 </div>
 
 <div class="form-group">

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.