From f540fa2a38d3021ef22543d9d73e0249dadab42f Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 10 Jun 2021 06:33:51 -0700 Subject: [PATCH] Unescape \r and \n in chatmessage text so multiline messages can be created from command line (#1387) * Unescape \r and \n in chatmessage text so multiline messages can be created * Bring gam report activity list up to date --- src/GamCommands.txt | 24 ++++++++++++++---------- src/gam/gapi/chat.py | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 036dfa7c..79671371 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -896,23 +896,27 @@ gam delete resoldsubscription cancel|downgrade|transfer_to_ gam info resoldsubscriptions [customer_auth_token ] ::= - access|accesstransparency| + access_transparency| admin| - calendar|calendars| + calendar| chat| - drive|doc|docs| - enterprisegroups|groupsenterprise| + chrome| + context_aware_access| + data_studio| + drive| gcp| - google+|gplus| - group|groups| - hangoutsmeet|meet| + gplus| + groups| + groups_enterprise| jamboard| - login|logins| + keep| + login| + meet| mobile| - oauthtoken|token|tokens| rules| saml| - useraccounts + token| + user_accounts ::= accounts| diff --git a/src/gam/gapi/chat.py b/src/gam/gapi/chat.py index 7c474f2c..85bba75b 100644 --- a/src/gam/gapi/chat.py +++ b/src/gam/gapi/chat.py @@ -102,7 +102,7 @@ def create_message(): while i < len(sys.argv): myarg = sys.argv[i].lower() if myarg == 'text': - body['text'] = sys.argv[i+1] + body['text'] = sys.argv[i+1].replace('\\r', '\r').replace('\\n', '\n') i += 2 elif myarg == 'textfile': filename = sys.argv[i + 1] @@ -172,7 +172,7 @@ def update_message(): while i < len(sys.argv): myarg = sys.argv[i].lower() if myarg == 'text': - body['text'] = sys.argv[i+1] + body['text'] = sys.argv[i+1].replace('\\r', '\r').replace('\\n', '\n') i += 2 elif myarg == 'textfile': filename = sys.argv[i + 1]