U
    nhQ                     @   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rt|j}
|
tjjkrlt	|j}t
|||j\}}n4|
tjjtjjfkr|j}t
t	|||j\}}	tj| |||	d tj| |||d || _d S )N)chat
input_chat)senderinput_sender)__dict__updateZ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!   d/var/www/html/peyman_registration/venvv2/lib/python3.8/site-packages/telethonv2/tl/custom/forward.pyr      s,      
  zForward.__init__N)__name__
__module____qualname____doc__r   r!   r!   r!   r"   r      s   r   N)
Z
chatgetterr   Zsendergetterr    r   r   tlr   r   r!   r!   r!   r"   <module>   s   