
    N[i                     \    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                   p    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   f   fdZ
y)ForwardMessagesNselfzpyrogram.Clientchat_idfrom_chat_idmessage_idsdisable_notificationschedule_dateprotect_content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 x7 cc c}w 7 "c c}w c c}w 7 >w)a  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).

            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).

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

            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.

        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silent	random_idr   
noforwardsr   )
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   is_iterable_rforwarded_messagesir$   r%   s                 ]/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/messages/forward_messages.pyforward_messagesz ForwardMessages.forward_messages   s    f %[#66+6d;'[M++MM""22"//88 $ 1 1, ??+3t2=>Q4;;=>#99-H* 3 

 

  "#''*Qq**"#''*Qq** 		A!cii88!ii??!iiAAC D #))--..aiiu 			 2=uzz,-WBTUVBWW5 9? ?

 +*ss   A$G8&G'G8>G!?G8G$#$G8G)G8G,0G8 G1A(G8=:G87G6
8'G8!G8$G8,G8)NNN)__name__
__module____qualname__r   r   strr   boolr   r   r4        r3   r   r      s     &*"& $RXRXsCxRX CHoRX 3-.	RX
 #RX  RX RX 
_ 55	6RXr;   r   )
r   typingr   r   r   pyrogramr   r   r	   r   r:   r;   r3   <module>r>      s'   &  ( (   SX SXr;   