<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_aliases(self):
 """ Get aliases information from room state Returns: boolean: True if the aliases changed, False if not """

        changed = False
        try:
            response = self.client.api.get_room_state(self.room_id)
        except MatrixRequestError:
            return False
        for chunk in response:
            content = chunk.get('content')
            if content:
                if 'aliases' in content:
                    aliases = content['aliases']
                    if aliases != self.aliases:
                        self.aliases = aliases
                        changed = True
                if chunk.get('type') == 'm.room.canonical_alias':
                    canonical_alias = content['alias']
                    if self.canonical_alias != canonical_alias:
                        self.canonical_alias = canonical_alias
                        changed = True
        if changed and self.aliases and not self.canonical_alias:
            self.canonical_alias = self.aliases[0]
        return changed