diff --git a/README.md b/README.md index 4863bba..d0e0911 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![Logo](/static/Twilio2Telegram_logo.png) Twilio2Telegram -Forward SMS and Calls from your Twilio number to Telegram +Forward Texts and Calls from your Twilio number to Telegram ## Installation @@ -32,4 +32,4 @@ And add the domain or ip of the server hosting Twilio2Telgram, `/call` for calls Optional : Twilio2Telegram listens for webhook calls on the 8080 port. -If you want to add https and user the port 80, set up a reverse proxy on the machine +If you want to add https and use the port 80, set up a reverse proxy on the machine diff --git a/Twilio2Telegram.py b/Twilio2Telegram.py index de2047a..54fd47e 100644 --- a/Twilio2Telegram.py +++ b/Twilio2Telegram.py @@ -12,7 +12,7 @@ except ImportError as err: # FB - Enable logging logging.basicConfig( - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) + format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) webhook_listener = Flask(__name__) @@ -99,7 +99,7 @@ def recv_message(): """Upon reception of a SMS.""" logger.info(' "/message" reached, IP: %s', request.remote_addr) # FB - Format telegram Message - telegram_message = 'Text from `+{From}` ({Country}, {State}) :``` {Body}```'.format( + telegram_message = 'Text from `{From}` ({Country}, {State}) :``` {Body}```'.format( From=request.values.get('From', 'unknown'), Country=request.values.get('FromCountry', 'unknown'), State=request.values.get('FromState', 'unknown'), @@ -122,7 +122,7 @@ def recv_call(): """Upon reception of a call.""" logger.info(' "/call" reached, IP: %s', request.remote_addr) # FB - Format telegram Message - telegram_message = 'Call from `+{From}` ({Country}, {State}) :``` {Status}```'.format( + telegram_message = 'Call from `{From}` ({Country}, {State}) :``` {Status}```'.format( From=request.values.get('From', 'unknown'), Country=request.values.get('FromCountry', 'unknown'), State=request.values.get('FromState', 'unknown'),