
    ;SiQ                     P    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ee      Z	y)	   )
ChatGetter)SenderGetter   )utilshelpers)typesc                       e Zd ZdZd Zy)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                    | j                   j                  |j                          || _        d x}x}x}x}x}}	|j                  rt	        j
                  |j                        }
|
t        j                  j                  k(  rDt        j                  |j                        }t        j                  |||j                        \  }}ny|
t        j                  j                  t        j                  j                  fv rC|j                  }t        j                  t        j                  |      ||j                        \  }}	t        j                  | |||	       t!        j                  | |||       || _        y )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   tys              _/var/www/OnlineNewsSite/project/venv/lib/python3.12/site-packages/telethon/tl/custom/forward.pyr   zForward.__init__   s?    	X../$GKK	KFK\KDK4*%%h&6&67BW((---!--h.>.>?	','='=x)@)@(B$ ++00'2E2E2M2MNN''#(#9#9%%d+Xv7N7N$P j 	D$TjIdIf<X    N)__name__
__module____qualname____doc__r    r&   r%   r
   r
      s    $r&   r
   N)

chatgetterr   sendergetterr    r   r   tlr   r
   r+   r&   r%   <module>r0      s    " &  *j, *r&   