GithubHelp home page GithubHelp logo

pluginsglpi / telegrambot Goto Github PK

View Code? Open in Web Editor NEW
39.0 21.0 32.0 1.38 MB

Telegram Bot for GLPI

Home Page: https://pluginsglpi.github.io/telegrambot/

License: GNU General Public License v3.0

PHP 83.50% Smarty 16.50%
telegram glpi bot plugin

telegrambot's Introduction

Telegram Bot for GLPI

GLPI Banner

License GPL 3.0 Project Status: Active – The project has reached a stable, usable state and is being actively developed. Telegram Group Github All Releases Follow Twitter Conventional Commits

Table of Contents

Synopsis

This Bot for GLPI allows you to get notifications on Telegram when a ticket is created on GLPI, keeping you up to date with what's happening in your IT infrastructure..

Build Status

Release channel Beta Channel
Travis CI build Travis CI build

Installation

Click on the image to view the video preview.

Everything Is AWESOME

Documentation

We maintain a detailed documentation of the project on the website, see our How-tos and Development sections.

Versioning

In order to provide transparency on our release cycle and to maintain backward compatibility, this project is maintained under the Semantic Versioning guidelines. We are committed to following and complying with the rules, the best we can.

See the tags section of our GitHub project for changelogs for each release version.

Contact

You can sen us a message through Telegram.

Professional Services

The GLPI Network services are available through our Partner's Network. We provide special training, bug fixes with editor subscription, contributions for new features, and more.

Obtain a personalized service experience, associated with benefits and opportunities.

Contribute

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the Issues Dashboard.

Copying

  • Name: GLPI is a registered trademark of Teclib'.
  • Code: you can redistribute it and/or modifyit under the terms of the GNU General Public License (GPLv3).
  • Documentation: released under Attribution 4.0 International (CC BY 4.0).

telegrambot's People

Contributors

filipemenezes avatar naylin15 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

Watchers

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

telegrambot's Issues

Community profile

  • README
  • Code of conduct
  • Contributing
  • License
  • Issue template and pull request template
  • GitHub App Settings
  • Project Site
  • Project Board
  • Milestones

Correção para envio de mensagem para grupo

Boa tarde, este plugin está configurado para somente enviar mensagem para que criou o Bot.
segue abaixo orientações de como deve ser realizado a configuração para que a mensagem seja enviada para o grupo.

Configuração do TELEGRAM

1.Procurar por BotFather dentro do Telegram
2.Adicionar um novo bot (/newbot)
3.Escolher um nome para o bot
4.Escolher um login para o bot (obrigatorio terminar com bot)
5.Anotar o Token
6.Verificar se o token está funcionando com a URL de Atualizações.
7.Adicionar o bot ao grupo usado o @login
8.Pegar o ID do grupo com a URL de Atualizações.
9.Fazer teste de envio com URL de envio.

URL de Atualizações:
https://api.telegram.org/bot**ColeSeuTokenAqui**/getUpdates

Quando adicionar o Bot a um grupo atualize o link acima para que seja possível verificar o ID do Grupo.

Realize o teste de envio de mensagem no link abaixo
URL de envio:
https://api.telegram.org/bot**ColeSeuTokenAqui**/sendMessage?chat_id=**ColeIDdoGrupoAqui**&text=TestandoEnvio

*Obs: No menú Configurar > Notificações > Telegram followups configuration deve ser observado o seguinte critério para que as mensagens sejam enviadas para um grupo.

token/sendMessage?chat_id=-IDdoGrupo
@usuario_bot_criado

Recomendo criar um usuário dentro do GLPI com o perfil de Observador para que lá em Destinatário na notifcação criada do Plugin do GLPI sejá colocado como Perfil: Observer

Qualquer dúvida estou a disposição.

Fatal Error

Fatal error: Class 'PluginTelegrambotNotificationWebsocketSetting' not found in /usr/share/glpi/inc/notificationsettingconfig.class.php on line 108

Notifications

Doesn't work properly with 9.5+

Hi!!, there will be an update upgrade to 9.5+ support? I am new installing this plugin but in the tests carried out it does not work with the latest version to this date, I followed the instructions but did not send any notification to telegram, thanks for your attention

Messages send only to one recipient instead of few

If message should be send to few techinicians, it's send only to one of them (probably last added, I'm not sure) as a few copies.
At least this happens on "New followup" event, I'm not tested them all.

How to reproduce:

  1. Setup telegram notifications to users A and B;
  2. Set notification with event "New followup" and recipient "Technician in charge of ticket";
  3. Assign users A and B as technicians to the ticket;
  4. Leave a new followup in this ticket;
  5. User B (or A, but only one of them) will recieve two copies of the notification.

error in 9.5.5

Hi, in my version 9.5.5 get error
Error. SQLSTATE[HY000] [1045] Access denied for user 'glpi_user'@'localhost' (using password: YES)

PHP Notice: Undefined index:

PHP Notice: Undefined index: telegram_username in /data/www/helpdesk-gumrf/glpi/plugins/telegrambot/inc/user.class.php at line 67

Error in messagelistener

Description in log: Action completed, no processing required
Details inside item log Running status: Error. Telegram returned an invalid response! Please review your bot name and API key.

I tried with two different bot names and I'm totally sure that token and username are correct but I still the error.

erro_glpi

Error after install

After install and enable the plugin, I tried to setup Telegram followups configuration apear this error.

PHP Warning: require(/var/www/html/glpi/plugins/telegrambot/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/glpi/plugins/telegrambot/inc/bot.class.php at line 29

Fatal error: require(): Failed opening required '/var/www/html/glpi/plugins/telegrambot/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/glpi/plugins/telegrambot/inc/bot.class.php on line 29

I have problems with connecting to telegram server.

Have a nice day developer! How can I bypass the telegram blocking that operates in the Russian Federation? There were attempts to find information about the connection in the source code, but nothing happened. In the network, I did not find any solutions. On you last hope.

Add Group ID to sent messages to group

Hello! It will be useful, if in glpi group setting (or some else) we can add an ID of group, where bot was included, like -1264758483
And notifications will be send once time to group with many users

No sentry Telegram notifications from GLPI

My bot only sends notifications to me, the other Telegram users are not notified when a ticket is created.

I have to create a group with the users that I will allow to receive notifications with my bot?

Help

Messages not sent from a sub entity

Hello,

Someone mailed us an issue with the plugin. Apparently, messages are not sent from sub entities.

The original message is:

Bonjour, Je me permet de vous contacter car j'ai un problème avec le notifications envoyé sur telegram. Dans mon glpi, j'ai une entité principal qui s'appelle XXXXXX et sous cette entité j'ai la liste de tout mes clients. Lorsque j'ouvre un ticket sous l'entité principal, les notifications envoyé sur telegram fonctionne. Par contre lorsque j'ouvre un ticket sous une entité qui porte le nom de mon client, je ne reçois aucune notification sur telegram.

API Error

2022-03-23 06:59 Start 0.000 seconds 0 Run Mode: GLPI
Running 0.085 seconds 0 Error. Telegram returned an invalid response! Please review your bot name and API key.
End 0.140 seconds 0 Action completed, no processing required

DevOps tasks

  • Continuous integration
  • Continuous deployment
  • Continuous delivery
  • Changelog
  • Test reports
  • Coverage reports
  • Code documentation
  • Artifacts for downloads and release description

Telegrambot don't send notofications to Telegtam

When I open a ticket, GLPI shows the http: error 500, and in php-error.log file appears the record:

[2019-06-17 13:03:27] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/glpi/inc/toolbox.class.php line 659
*** PHP Notice(8): Undefined index: telegram_username
Backtrace :
plugins/telegrambot/inc/user.class.php:52
plugins/telegrambot/inc/user.class.php:65 PluginTelegrambotUser::item_add_user()
: PluginTelegrambotUser::item_update_user()
inc/plugin.class.php:1112 call_user_func()
inc/commondbtm.class.php:1361 Plugin::doHook()
inc/auth.class.php:819 CommonDBTM->update()
front/login.php:84 Auth->login()

Help me please to fix it.

Format to submit the plugin

http://plugins.glpi-project.org/#/submit

<root>
  <name>Displayed name</name>
  <key>System name</key>
  <state>stable</state>
  <logo>http://link/to/logo/with/dimensions/40px/40px</logo>
  <description>
    <short>
      <en>short description of the plugin, displayed on list, text only</en>
      <lang>...</lang>
    </short>
    <long>
      <en>short description of the plugin, displayed on detail, Markdown accepted</en>
      <lang>...</lang>
    </long>
  </description>
  <homepage>http://link/to/your/page</homepage>
  <download>http://link/to/your/files</download>
  <issues>http://link/to/your/issues</issues>
  <readme>http://link/to/your/readme</readme>
  <authors>
    <author>Your name</author>
  </authors>
  <versions>
    <version>
      <num>1.0</num>
      <compatibility>0.90</compatibility>
    </version>
  </versions>
  <langs>
    <lang>en_GB</lang>
    <lang>...</lang>
  </langs>
  <license>GPL v2+</license>
  <tags>
    <en>
      <tag>tag1</tag>
    </en>
    <lang>
      <tag>tag1</tag>
    </lang>
  </tags>
  <screenshots>
    <screenshot>http://link/to/your/screenshot</screenshot>
    <screenshot>http://link/to/your/screenshot</screenshot>
    <screenshot>...</screenshot>
  </screenshots>
</root>

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.