Ë
    S"“jô  ã                   óD   — d dl mZ ddl mZmZmZ ddl mZ  G d„ d«      Zy)	é   )ÚDrafté   )ÚTLObjectÚtypesÚ	functionsé   )Úutilsc                   ó>   — e Zd ZdZd„ Zd„ Zd
d„Zdd„Zd„ Zd„ Z	d„ Z
y	)ÚDialoga|
  
    Custom class that encapsulates a dialog (an open "conversation" with
    someone, a group or a channel) providing an abstraction to easily
    access the input version/normal entity/message etc. The library will
    return instances of this class when calling :meth:`.get_dialogs()`.

    Args:
        dialog (:tl:`Dialog`):
            The original ``Dialog`` instance.

        pinned (`bool`):
            Whether this dialog is pinned to the top or not.

        folder_id (`folder_id`):
            The folder ID that this dialog belongs to.

        archived (`bool`):
            Whether this dialog is archived or not (``folder_id is None``).

        message (`Message <telethon.tl.custom.message.Message>`):
            The last message sent on this dialog. Note that this member
            will not be updated when new messages arrive, it's only set
            on creation of the instance.

        date (`datetime`):
            The date of the last message sent on this dialog.

        entity (`entity`):
            The entity that belongs to this dialog (user, chat or channel).

        input_entity (:tl:`InputPeer`):
            Input version of the entity.

        id (`int`):
            The marked ID of the entity, which is guaranteed to be unique.

        name (`str`):
            Display name for this dialog. For chats and channels this is
            their title, and for users it's "First-Name Last-Name".

        title (`str`):
            Alias for `name`.

        unread_count (`int`):
            How many messages are currently unread in this dialog. Note that
            this value won't update when new messages arrive.

        unread_mentions_count (`int`):
            How many mentions are currently unread in this dialog. Note that
            this value won't update when new messages arrive.

        unread_reactions_count (`int`):
            How many reactions are currently unread in this dialog. Note that
            this value won't update when new messages arrive.

        unread_poll_votes_count (`int`):
            How many poll votes are currently unread in this dialog. Note that
            this value won't update when new messages arrive.

        draft (`Draft <telethon.tl.custom.draft.Draft>`):
            The draft object in this dialog. It will not be `None`,
            so you can call ``draft.set_message(...)``.

        is_user (`bool`):
            `True` if the `entity` is a :tl:`User`.

        is_group (`bool`):
            `True` if the `entity` is a :tl:`Chat`
            or a :tl:`Channel` megagroup.

        is_channel (`bool`):
            `True` if the `entity` is a :tl:`Channel`.
    c                 ó�  — || _         || _        t        |j                  «      | _        |j                  | _        |j                  d u| _        || _        t        | j                  dd «      | _        |t        j                  |j                  «         | _        t        j                  | j                  «      | _        t        j                  | j                  «      | _        t        j                   | j                  «      x| _        | _        |j&                  | _        |j(                  | _        |j*                  | _        |j,                  | _        t/        || j                  | j                  j0                  «      | _        t3        | j                  t4        j6                  «      | _        t3        | j                  t4        j:                  t4        j<                  f«      xs< t3        | j                  t4        j>                  «      xr | j                  j@                  | _!        t3        | j                  t4        j>                  «      | _"        y )NÚdate)#Ú_clientÚdialogÚboolÚpinnedÚ	folder_idÚarchivedÚmessageÚgetattrr   r	   Úget_peer_idÚpeerÚentityÚget_input_peerÚinput_entityÚidÚget_display_nameÚnameÚtitleÚunread_countÚunread_mentions_countÚunread_reactions_countÚunread_poll_votes_countr   ÚdraftÚ
isinstancer   ÚUserÚis_userÚChatÚChatForbiddenÚChannelÚ	megagroupÚis_groupÚ
is_channel)ÚselfÚclientr   Úentitiesr   s        úZ/var/www/api.ozpay.ru/ozpay/venv/lib/python3.12/site-packages/telethon/tl/custom/dialog.pyÚ__init__zDialog.__init__P   sŽ  € àˆŒØˆŒÜ˜6Ÿ=™=Ó)ˆŒØ×)Ñ)ˆŒØ×(Ñ(°Ð4ˆŒØˆŒÜ˜DŸL™L¨&°$Ó7ˆŒ	àœu×0Ñ0°·±Ó=Ñ>ˆŒÜ!×0Ñ0°·±Ó=ˆÔÜ×#Ñ# D§K¡KÓ0ˆŒÜ!&×!7Ñ!7¸¿¹Ó!DÐDˆŒ	�D”Jà"×/Ñ/ˆÔØ%+×%AÑ%AˆÔ"Ø&,×&CÑ&CˆÔ#Ø'-×'EÑ'EˆÔ$ä˜6 4§;¡;°·±×0AÑ0AÓBˆŒ
ä! $§+¡+¬u¯z©zÓ:ˆŒä�t—{‘{¤U§Z¡Z´×1DÑ1DÐ$EÓFò OÜ˜Ÿ™¤U§]¡]Ó3ÒM¸¿¹×8MÑ8Mð 	Œô % T§[¡[´%·-±-Ó@ˆ�ó    c              �   ór   K  —  | j                   j                  | j                  g|¢­i |¤Žƒ d{  –—† S 7 Œ­w)z–
        Sends a message to this dialog. This is just a wrapper around
        ``client.send_message(dialog.input_entity, *args, **kwargs)``.
        N)r   Úsend_messager   )r-   ÚargsÚkwargss      r0   r4   zDialog.send_messagem   sD   è ø€ ð
 /�T—\‘\×.Ñ.Ø×Ñð0Ø $ò0Ø(.ñ0÷ 0ð 	0ð 0ús   ‚.7°5±7c              ƒ   ón   K  — | j                   j                  | j                  |¬«      ƒ d{  –—†  y7 Œ­w)a  
        Deletes the dialog from your dialog list. If you own the
        channel this won't destroy it, only delete it from the list.

        Shorthand for `telethon.client.dialogs.DialogMethods.delete_dialog`
        with ``entity`` already set.
        )ÚrevokeN)r   Údelete_dialogr   )r-   r8   s     r0   ÚdeletezDialog.deleteu   s)   è ø€ ð �l‰l×(Ñ(¨¯©¸VÐ(ÓD×DÒDús   ‚+5­3®5c              ƒ   óº   K  — | j                  t        j                  j                  t	        j
                  | j                  |¬«      g«      «      ƒ d{  –—† S 7 Œ­w)aþ  
        Archives (or un-archives) this dialog.

        Args:
            folder (`int`, optional):
                The folder to which the dialog should be archived to.

                If you want to "un-archive" it, use ``folder=0``.

        Returns:
            The :tl:`Updates` object that the request produces.

        Example:

            .. code-block:: python

                # Archiving
                dialog.archive()

                # Un-archiving
                dialog.archive(0)
        )r   N)r   r   ÚfoldersÚEditPeerFoldersRequestr   ÚInputFolderPeerr   )r-   Úfolders     r0   ÚarchivezDialog.archive‚   sR   è ø€ ð. —\‘\¤)×"3Ñ"3×"JÑ"JÜ×!Ñ! $×"3Ñ"3¸vÔFðL
ó #ó ÷ ð 	ð ús   ‚AAÁAÁAc                 óx   — d| j                   | j                  | j                  | j                  | j                  dœS )Nr   )Ú_r   r   r#   r   r   )r   r   r#   r   r   ©r-   s    r0   Úto_dictzDialog.to_dict�   s2   € àØ—I‘IØ—I‘IØ—Z‘ZØ—|‘|Ø—k‘kñ
ð 	
r2   c                 óH   — t        j                  | j                  «       «      S )N©r   Úpretty_formatrD   rC   s    r0   Ú__str__zDialog.__str__§   s   € Ü×%Ñ% d§l¡l£nÓ5Ð5r2   c                 óL   — t        j                  | j                  «       d¬«      S )Né    )ÚindentrF   rC   s    r0   Ú	stringifyzDialog.stringifyª   s   € Ü×%Ñ% d§l¡l£n¸QÔ?Ð?r2   N)F)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r1   r4   r:   r@   rD   rH   rL   © r2   r0   r   r      s/   „ ñHòRAò:0óEóò6
ò6ó@r2   r   N)Ú r   r   r   r   r	   r   rQ   r2   r0   ú<module>rS      s   ðÝ ß )Ñ )Ý ÷e@ò e@r2   