amsync/obj.py
async def change_co_hosts(
        add:    list[str] | str | None = None,
        remove: list[str] | str | None = None,
        com:    str | None = None,
        chat:   str | None = None
    ) -> Res | list[Res]:
        """
        Add or remove co-hosts
        """

        com = com or actual_com
        chat = chat or actual_chat
        add = to_list(add)

        if add:
            return await _req('post', f'x{com}/s/chat/thread/{chat}/co-host', data={'uidList': add})
        elif remove:
            async def foo(i):
                return await _req('delete', f'x{com}/s/chat/thread/{chat}/co-host/{i}')
            return one_or_list(await gather(*[foo(i) for i in remove]))

        Add or remove co-hosts
        
Add or remove co-hosts
Add or remove co - hosts
async def change_co_hosts(
        add:    list[str] | str | None = None,
        remove: list[str] | str | None = None,
        com:    str | None = None,
        chat:   str | None = None
    ) -> Res | list[Res]:
        com = com or actual_com
        chat = chat or actual_chat
        add = to_list(add)
        if add:
            return await _req('post', f'x{com}/s/chat/thread/{chat}/co-host', data={'uidList': add})
        elif remove:
            async def foo(i):
                return await _req('delete', f'x{com}/s/chat/thread/{chat}/co-host/{i}')
            return one_or_list(await gather(*[foo(i) for i in remove]))
async def change_co_hosts ( add : list [ str ] | str | None = None , remove : list [ str ] | str | None = None , com : str | None = None , chat : str | None = None ) -> Res | list [ Res ] : com = com or actual_com chat = chat or actual_chat add = to_list ( add ) if add : return await _req ( 'post' , f'x{com}/s/chat/thread/{chat}/co-host' , data = { 'uidList' : add } ) elif remove : async def foo ( i ) : return await _req ( 'delete' , f'x{com}/s/chat/thread/{chat}/co-host/{i}' ) return one_or_list ( await gather ( * [ foo ( i ) for i in remove ] ) )
Add or remove co-hosts
Add or remove co - hosts
"""
        Add or remove co-hosts
        """
add
list[str] | str | None
remove
list[str] | str | None
com
str | None
chat
str | None