Ë
    :É„jÁ  ã                   ó\   — d dl m Z  d dlmZmZmZ d dlZd dlmZmZ d dlmZ  G d„ d«      Z	y)é    )Údatetime)ÚUnionÚListÚIterableN)ÚrawÚutils)Útypesc                   óŽ   — e Zd Z	 	 	 	 	 	 	 	 ddddeeef   deeef   deeee   f   deded	ed
edededededede	d   f   fd„Z
y)ÚForwardMessagesNÚselfzpyrogram.ClientÚchat_idÚfrom_chat_idÚmessage_idsÚmessage_thread_idÚdisable_notificationÚschedule_dateÚprotect_contentÚallow_paid_broadcastÚdrop_authorÚremove_captionÚnew_video_start_timestampÚreturnztypes.Messagec              ƒ   óþ  K  — t        |t        «       }|rt        |«      n|g}| j                  t        j
                  j                  j                  | j                  |«      ƒ d{  –—† | j                  |«      ƒ d{  –—† |||xs d|D �cg c]  }| j                  «       ‘Œ c}t        j                  |«      |||	|
|¬«      «      ƒ d{  –—† }g }|j                  D �ci c]  }|j                  |“Œ }}|j                  D �ci c]  }|j                  |“Œ }}|j                  D ]�  }t        |t        j                   j"                  t        j                   j$                  t        j                   j&                  f«      sŒ[|j)                  t         j*                  j-                  | |j.                  ||«      ƒ d{  –—† «       ŒŸ |rt!        j0                  |«      S |d   S 7 �Œ}7 �Œhc c}w 7 �Œ"c c}w c c}w 7 Œ>­w)ab  Forward messages of any kind.

        .. include:: /_includes/usable-by/users-bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).
                You can also use chat public link in form of *t.me/<username>* (str).

            from_chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the source chat where the original message was sent.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).
                You can also use chat public link in form of *t.me/<username>* (str).

            message_ids (``int`` | Iterable of ``int``):
                An iterable of message identifiers in the chat specified in *from_chat_id* or a single message id.

            message_thread_id (``int``, *optional*):
                Unique identifier of a message thread to which the message belongs.
                for supergroups only

            disable_notification (``bool``, *optional*):
                Sends the message silently.
                Users will receive a notification with no sound.

            schedule_date (:py:obj:`~datetime.datetime`, *optional*):
                Date when the message will be automatically sent.

            protect_content (``bool``, *optional*):
                Protects the contents of the sent message from forwarding and saving.

            allow_paid_broadcast (``bool``, *optional*):
                Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only.

            drop_author (``bool``, *optional*):
                Pass True to forwards messages without quoting the original author.
                
            remove_caption (``bool``, *optional*):
                Pass True to remove media captions of message copies.
                
            new_video_start_timestamp (``int``, *optional*):
                The new video start timestamp. Pass time to replace video start timestamp in the forwarded message.

        Returns:
            :obj:`~pyrogram.types.Message` | List of :obj:`~pyrogram.types.Message`: In case *message_ids* was not
            a list, a single message is returned, otherwise a list of messages is returned.

        Example:
            .. code-block:: python

                # Forward a single message
                await app.forward_messages(to_chat, from_chat, 123)

                # Forward multiple messages at once
                await app.forward_messages(to_chat, from_chat, [1, 2, 3])
        N)Úto_peerÚ	from_peerÚidÚ
top_msg_idÚsilentÚ	random_idr   Ú
noforwardsÚallow_paid_floodskipr   Údrop_media_captionsÚvideo_timestampr   )Ú
isinstanceÚintÚlistÚinvoker   Ú	functionsÚmessagesr   Úresolve_peerÚrnd_idr   Údatetime_to_timestampÚusersr   ÚchatsÚupdatesr	   ÚUpdateNewMessageÚUpdateNewChannelMessageÚUpdateNewScheduledMessageÚappendÚMessageÚ_parseÚmessager   )r   r   r   r   r   r   r   r   r   r   r   r   Úis_iterableÚ_ÚrÚforwarded_messagesÚir-   r.   s                      úa/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/messages/forward_messages.pyÚforward_messagesz ForwardMessages.forward_messages   s¾  è ø€ ôT % [´#Ó6Ð6ˆÙ+6”d˜;Ô'¸[¸Mˆà—+‘+Ü�M‰M×"Ñ"×2Ñ2Ø"×/Ñ/°Ó8×8Ø $× 1Ñ 1°,Ó ?×?ØØ,Ø+Ò3¨tØ2=Ö>¨Q˜4Ÿ;™;�=Ò>Ü#×9Ñ9¸-ÓHØ*Ø%9Ø'Ø$2Ø 9ð 3ó ó
÷ 
ˆð"  Ðà"#§'¡'Ö*˜Q�—‘�q‘Ð*ˆÐ*Ø"#§'¡'Ö*˜Q�—‘�q‘Ð*ˆÐ*à—‘ò 		ˆAÜ˜!œcŸi™i×8Ñ8Ü!Ÿi™i×?Ñ?Ü!Ÿi™i×AÑAðCõ Dð #×)Ñ)ÜŸ-™-×.Ñ.Ø˜aŸi™iØ˜uó÷ õð			ñ 2=Œu�z‰zÐ,Ó-ÐWÐBTÐUVÑBWÐWð? 9ùØ?ûò ?ð
ûò& +ùÚ*ðúss   ‚A$G=Á&G#Á'G=Á>G&Á?G=ÂG)Â$(G=ÃG.ÃG=Ã!G1Ã5G=ÄG6ÄA(G=Æ:G=Æ<G;
Æ='G=Ç&G=Ç)G=Ç1G=)NNNNNNNN)Ú__name__Ú
__module__Ú__qualname__r   r%   Ústrr   Úboolr   r   r=   © ó    r<   r   r      sè   „ ð "&Ø%)Ø"&Ø $Ø%)Ø Ø#Ø)-ñnXØðnXà�s˜C�x‘ðnXð ˜C ˜H‘oðnXð ˜3 ¨¡Ð-Ñ.ð	nXð
 ðnXð #ðnXð  ðnXð ðnXð #ðnXð ðnXð ðnXð $'ðnXð 
ˆ  _Ñ 5Ð5Ñ	6ônXrD   r   )
r   Útypingr   r   r   Úpyrogramr   r   r	   r   rC   rD   r<   ú<module>rG      s'   ðõ( ß (Ñ (ã ß Ý ÷oXò oXrD   