docs: async def set_presence(self, status: str = "online", ignore_cache: bool = False):
          """
          Set the online status of the user. See also: `API reference`_
  
          Args:
              status: The online status of the user. Allowed values: "online", "offline", "unavailable".
              ignore_cache: Whether or not to set presence even if the cache says the presence is
                  already set to that value.
  
          .. _API reference:
             https://matrix.org/docs/spec/client_server/r0.3.0.html#put-matrix-client-r0-presence-userid-status
          """
          await self.ensure_registered()
          if not ignore_cache and self.state_store.has_presence(self.mxid, status):
              return
  
          content = {
              "presence": status
          }
          resp = await self.client.request("PUT", f"/presence/{self.mxid}/status", content)
          self.state_store.set_presence(self.mxid, status)