Added option clearattachments <String> to gam [<UserTypeMessage>] update chatmessage

This commit is contained in:
Ross Scroggs
2025-10-23 17:14:18 -07:00
parent 8b182b7b37
commit 4a4b154d3d
5 changed files with 37 additions and 10 deletions

View File

@@ -288,7 +288,7 @@ gam create chatmessage spaces spaces/AAAADi-pvqc gdoc announcements@domain.com n
Updates and rewrites an existing Chat message. Message will show as edited and no notification will be sent to members. Updates and rewrites an existing Chat message. Message will show as edited and no notification will be sent to members.
``` ```
gam update chatmessage name <ChatMessage> gam update chatmessage name <ChatMessage>
<ChatContent> [<ChatContent>] [clearattachments <String>]
``` ```
Specify the source of the message: Specify the source of the message:
* `text <String>` - The message is `<String>` * `text <String>` - The message is `<String>`
@@ -296,12 +296,22 @@ Specify the source of the message:
* `gdoc <UserGoogleDoc>` - The message is read from a Google Doc. * `gdoc <UserGoogleDoc>` - The message is read from a Google Doc.
* `gcsdoc <StorageBucketObjectName>` - The message is read from a Google Cloud Storage file. * `gcsdoc <StorageBucketObjectName>` - The message is read from a Google Cloud Storage file.
The option `clearattachments <String>` can be used to clear all attachments from a Chat message.
If `<ChatContent>` is not specified, the current message text is retained and `<String>` is appended;
`<String>` must be specified but can be empty in which case the current message test is preserved as-is.
### Example ### Example
This example updates an existing chat message with new text. This example updates an existing chat message with new text.
``` ```
gam update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU text "HELLO CHAT?" gam update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU text "HELLO CHAT?"
``` ```
This example clears attachments from a chat message and appends ` - Attachments cleared`
to the current message text.
```
gam update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU clearattachments " - Attachments cleared"
```
---- ----
## Delete a Chat Message ## Delete a Chat Message

View File

@@ -10,6 +10,13 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.27.02
Added option `clearattachments <String>` to `gam [<UserTypeMessage>] update chatmessage`
that clears all attachments from a Chat message. If `<ChatContent>` is not specified,
the current message text is retained and `<String>` is appended; `<String>` must be specified
but can be empty in which case the current message test is preserved as-is.
### 7.27.01 ### 7.27.01
Fixed bug in `gam <UserTypeEntity> claim ownership <DriveFileEntity> ... onlyUsers|skipusers <UserTypeEntity>` Fixed bug in `gam <UserTypeEntity> claim ownership <DriveFileEntity> ... onlyUsers|skipusers <UserTypeEntity>`

View File

@@ -252,7 +252,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version admin@server:/Users/admin$ gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAM 7.27.01 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.27.02 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64 macOS Tahoe 26.0.1 x86_64
@@ -990,7 +990,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version C:\>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAM 7.27.01 - https://github.com/GAM-team/GAM - pythonsource GAM 7.27.02 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
Windows-10-10.0.17134 AMD64 Windows-10-10.0.17134 AMD64

View File

@@ -751,7 +751,7 @@ gam user user@domain.com create chatmessage spaces spaces/AAAADi-pvqc gdoc annou
Updates and rewrites an existing Chat message. Message will show as edited and no notification will be sent to members. Updates and rewrites an existing Chat message. Message will show as edited and no notification will be sent to members.
``` ```
gam <UserTypeEntity> update chatmessage name <ChatMessage> gam <UserTypeEntity> update chatmessage name <ChatMessage>
<ChatContent> [<ChatContent>] [clearattachments <String>]
``` ```
Specify the text of the message: `<ChatContent>` Specify the text of the message: `<ChatContent>`
* `text <String>` - The message is `<String>` * `text <String>` - The message is `<String>`
@@ -759,12 +759,22 @@ Specify the text of the message: `<ChatContent>`
* `gdoc <UserGoogleDoc>` - The message is read from a Google Doc. * `gdoc <UserGoogleDoc>` - The message is read from a Google Doc.
* `gcsdoc <StorageBucketObjectName>` - The message is read from a Google Cloud Storage file. * `gcsdoc <StorageBucketObjectName>` - The message is read from a Google Cloud Storage file.
The option `clearattachments <String>` can be used to clear all attachments from a Chat message.
If `<ChatContent>` is not specified, the current message text is retained and `<String>` is appended;
`<String>` must be specified but can be empty in which case the current message test is preserved as-is.
### Example ### Example
This example updates an existing chat message with new text. This example updates an existing chat message with new text.
``` ```
gam user user@domain.com update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU text "HELLO CHAT?" gam user user@domain.com update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU text "HELLO CHAT?"
``` ```
This example clears attachments from a chat message and appends ` - Attachments cleared`
to the current message text.
```
gam user user@domain.com update chatmessage name spaces/AAAADi-pvqc/messages/PKJrx90ooIU.PKJrx90ooIU clearattachments " - Attachments cleared"
```
### Delete a Chat Message ### Delete a Chat Message
Deletes the given Chat message. Members will no longer see the message. Deletes the given Chat message. Members will no longer see the message.

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details Print the current version of Gam with details
``` ```
gam version gam version
GAM 7.27.01 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.27.02 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64 macOS Tahoe 26.0.1 x86_64
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information Print the current version of Gam with details and time offset information
``` ```
gam version timeoffset gam version timeoffset
GAM 7.27.01 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.27.02 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64 macOS Tahoe 26.0.1 x86_64
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information Print the current version of Gam with extended details and SSL information
``` ```
gam version extended gam version extended
GAM 7.27.01 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.27.02 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64 macOS Tahoe 26.0.1 x86_64
@@ -68,7 +68,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7 Path: /Users/Admin/bin/gam7
Version Check: Version Check:
Current: 5.35.08 Current: 5.35.08
Latest: 7.27.01 Latest: 7.27.02
echo $? echo $?
1 1
``` ```
@@ -76,7 +76,7 @@ echo $?
Print the current version number without details Print the current version number without details
``` ```
gam version simple gam version simple
7.27.01 7.27.02
``` ```
In Linux/MacOS you can do: In Linux/MacOS you can do:
``` ```
@@ -86,7 +86,7 @@ echo $VER
Print the current version of Gam and address of this Wiki Print the current version of Gam and address of this Wiki
``` ```
gam help gam help
GAM 7.27.01 - https://github.com/GAM-team/GAM GAM 7.27.02 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64 macOS Tahoe 26.0.1 x86_64