Method: users.spaces.updateSpaceReadState
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
    
    
    
      
      
      
        更新使用者在聊天室中的已讀狀態,用於識別已讀和未讀訊息。如需範例,請參閱「更新使用者的聊天室讀取狀態」。
需要使用授權範圍的使用者驗證:
        
          https://www.googleapis.com/auth/chat.users.readstate 
        
      
      
        
          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 早於最新訊息建立時間,聊天室就會在 UI 中顯示為未讀。 如要將此空間標示為已讀取,請將 lastReadTime 設為大於 (晚於) 最新訊息建立時間的任何值。lastReadTime 會強制設為與最新訊息建立時間相符。請注意,聊天室已讀狀態只會影響在聊天室頂層對話中顯示的訊息的已讀狀態。討論串中的回覆不會受到這個時間戳記的影響,而是取決於討論串的讀取狀態。 
                 | 
              
            
          
        
        
          要求主體
          要求主體包含 SpaceReadState 的例項。
        
        
          回應主體
          如果成功,回應主體會包含 SpaceReadState 的執行例項。
        
        
          授權範圍
          需要下列 OAuth 範圍:
          
            https://www.googleapis.com/auth/chat.users.readstate 
          
詳情請參閱授權指南。
        
      
      
    
  
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-25 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],["This outlines updating a user's read state in a space using a PATCH request to `https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}`. Key components include specifying the `spaceReadState.name` in the path, updating the `lastReadTime` via the `updateMask` query parameter, and providing a `SpaceReadState` instance in the request body. The response, if successful, returns a `SpaceReadState` instance. This operation requires user authentication and the `https://www.googleapis.com/auth/chat.users.readstate` authorization scope.\n"]]