简体   繁体   中英

Group Settings API seems to be bugged

I don't believe there is much to say. Whenever I PATCH or UPDATE the "whoCanPostMessage" setting from "ALL_MEMBERS_CAN_POST" to "ALL_MANAGERS_CAN_POST" the Google API backend just ignores it.

This issue is present from 06-06-2016.

在此处输入图片说明

The behaviour you noted is a side effect of a known issue, whereby setting messageModerationLevel to MODERATE_ALL_MESSAGES , causes whoCanPostMessage to be changed to ALL_MEMBERS_CAN_POST , as viewed via the Groups Settings API. The Groups UI still sees the correct setting.

Unfortunately, once modified, whoCanPostMessage can't be changed by subsequent PUT requests. The issue is being addressed by Google engineers, and can be reproduced via the following steps:

  1. Set Posting permissions via the Groups UI to one, or both, of the following:

'Owners of the group',

'Managers of the group'

  1. Perform a Groups Settings API GET request, in which you'll see:

"messageModerationLevel": "MODERATE_NONE",

"whoCanPostMessage": "ALL_MANAGERS_CAN_POST"

  1. Perform a Groups Settings API PUT request, with the request body set to the result of the previous request ensuring that the following are set:

"messageModerationLevel": "MODERATE_ALL_MESSAGES",

"whoCanPostMessage": "ALL_MANAGERS_CAN_POST"

  1. The response indicates:

"messageModerationLevel": "MODERATE_ALL_MESSAGES",

"whoCanPostMessage": "ALL_MEMBERS_CAN_POST",

  1. The Groups UI still indicates the correct value for who can post to the group, ie

'Owners of the group',

'Managers of the group'.

To avoid this issue, I'd recommend NOT setting messageModerationLevel to MODERATE_ALL_MESSAGES , when only managers can post to the group, as they are the ones who would approve posts anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM