Telegram notification service

Parad0x 0227f2a9f4 - Updated README.md преди 6 години
src 680f9f14e9 - Added JSDocs for most functions преди 6 години
systemd-unit 33beb64627 - Updated totify`s unit file to support enable преди 6 години
.gitattributes 8fdc1faa82 - Moved to typescript преди 6 години
.gitignore 215808bbec - Add packaging script преди 6 години
LICENSE.md 492c8b3f2c - Fixed license author and year преди 6 години
README.md 0227f2a9f4 - Updated README.md преди 6 години
TODO e086d8483e - Added TODO преди 6 години
client.js 8fdc1faa82 - Moved to typescript преди 6 години
package-lock.json 44eadf8b22 - Removed nodemon and empty settings преди 6 години
package.json 44eadf8b22 - Removed nodemon and empty settings преди 6 години
pkg.sh b1b9b81f69 - Fixed pkh.sh script final cwd преди 6 години
tsconfig.json 8fdc1faa82 - Moved to typescript преди 6 години

README.md

Totify

Simple communication bridge between clients and telegram. Using sockets is simple way for other clients to send notification. Current version support only one way communication (from client to telegram) but it should be possible to implement registering command. Protocol is based on queue where elements are separated with semicolons.

Protocol's Operators

register

Reply with "<id>&<auth>"

register;

login (authcode)

Reply with OK on success or ERR with message;

login;PIZS-4681-bKUp-2154;

notify (msg)

Need authentication Reply with OK on success or ERR with message;

notify; test notification;

ping

Reply with pong

ping;

close

Reply with closing message and close server connection

close;

Sample Comunication

Server in: register;close;
Server out: 5&GSFBT-665-oJDDKqerYCWwfmtFWOOD;
Server in: login;EDSPG-466-VlyoDV9i6mBOAwle0hZU;ping;notify;Test;close;
Server out: OK;pong;OK;Closing connection;
Server in: login;invalid-code;
Server out: ERR;auth unmatched or not activated;
Server in: notify;notify without login;
Server out: ERR;need to be logged;