Method: users.spaces.updateSpaceReadState
HTTP 请求
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
网址采用 gRPC 转码语法。
路径参数
参数 |
spaceReadState.name |
string
聊天室读取状态的资源名称。 格式:users/{user}/spaces/{space}/spaceReadState
|
查询参数
参数 |
updateMask |
string (FieldMask format)
必需。要更新的字段路径。目前支持的字段路径:
当 lastReadTime 早于最新消息创建时间时,聊天室在界面中显示为未读。 如需将聊天室标记为已读,请将 lastReadTime 设置为晚于(大于)最新消息创建时间的任意值。lastReadTime 会强制转换为与最新消息创建时间一致的时间。请注意,聊天室的读取状态只会影响聊天室顶级对话中显示的消息的读取状态。线程中的回复不受此时间戳的影响,而是依赖于线程读取状态。
|
请求正文
请求正文包含一个 SpaceReadState
实例。
响应正文
如果成功,则响应正文包含一个 SpaceReadState
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/chat.users.readstate
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-23。
[null,null,["最后更新时间 (UTC):2024-10-23。"],[[["This API updates a user's read state within a Google Chat space, marking messages as read or unread."],["It requires user authentication and the `chat.users.readstate` OAuth scope for authorization."],["The request uses the PATCH method and specifies the space read state resource name in the URL path."],["You can control which fields to update using the `updateMask` query parameter, such as setting the `lastReadTime` to mark a space as read."],["The request and response bodies utilize the `SpaceReadState` object to represent the user's read state information."]]],[]]