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
This commit is contained in:
Ross Scroggs
2021-06-10 06:33:51 -07:00
committed by GitHub
parent 2d7bc2f34a
commit f540fa2a38
2 changed files with 16 additions and 12 deletions

View File

@ -896,23 +896,27 @@ gam delete resoldsubscription <CustomerID> <SKUID> cancel|downgrade|transfer_to_
gam info resoldsubscriptions <CustomerID> [customer_auth_token <String>]
<ActivityApplicationName> ::=
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
<ReportsApp> ::=
accounts|

View File

@ -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]