o
    XzjQ  ã                   @   sJ   d dl mZ d dlmZ ddlmZmZ ddlmZ G dd„ deeƒZ	dS )	é   )Ú
ChatGetter)ÚSenderGetteré   )ÚutilsÚhelpers)Útypesc                   @   s   e Zd ZdZdd„ ZdS )ÚForwarda¬  
    Custom class that encapsulates a :tl:`MessageFwdHeader` providing an
    abstraction to easily access information like the original sender.

    Remember that this class implements `ChatGetter
    <telethon.tl.custom.chatgetter.ChatGetter>` and `SenderGetter
    <telethon.tl.custom.sendergetter.SenderGetter>` which means you
    have access to all their sender and chat properties and methods.

    Attributes:

        original_fwd (:tl:`MessageFwdHeader`):
            The original :tl:`MessageFwdHeader` instance.

        Any other attribute:
            Attributes not described here are the same as those available
            in the original :tl:`MessageFwdHeader`.
    c                 C   sÎ   | j  |j ¡ || _d  } } } } }}	|jrPt |j¡}
|
tjjkr6t 	|j¡}t 
|||j¡\}}n|
tjjtjjfv rP|j}t 
t 	|¡||j¡\}}	tj| |||	d� tj| |||d� || _d S )N)ÚchatÚ
input_chat)ÚsenderÚinput_sender)Ú__dict__ÚupdateÚoriginal_fwdÚfrom_idr   Ú_entity_typeÚ_EntityTypeÚUSERr   Úget_peer_idÚ_get_entity_pairÚ_mb_entity_cacheÚCHATÚCHANNELr   Ú__init__r   Ú_client)ÚselfÚclientÚoriginalÚentitiesÚ	sender_idr   r   Úpeerr	   r
   Úty© r"   úU/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telethon/tl/custom/forward.pyr      s$   
ÿÿ
zForward.__init__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r"   r"   r"   r#   r      s    r   N)
Ú
chatgetterr   Úsendergetterr   Ú r   r   Útlr   r   r"   r"   r"   r#   Ú<module>   s
    