1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/VKTeams/Message-sending/Forward-message.md
2024-08-13 15:52:26 +03:00

1.7 KiB

sidebar_position
8

Forward message

Forwards an existing message to the current dialog box

Function ForwardMessage(Val Token, Val MessageID, Val FromChatID, Val ChatID, Val Text = "") Export

Parameter CLI option Type Description
Token --token String Bot token
MessageID --message String, Number Original message ID
FromChatID --fromid String, Number Source chat ID
ChatID --chatid String, Number Chat ID for message sending
Text --text String Additional message text

Returns: HTTPResponse - Forward message


:::tip Only the chatId from events can be passed to the FromChatID (the code from the chat link is not suitable))

Method at API documentation: GET /messages/sendText :::

  Token      = FunctionParameters["VkTeams_Token"];
  ChatID     = FunctionParameters["VkTeams_ChatID"];
  FromChatID = FunctionParameters["VkTeams_ChatID2"];
  MessageID  = FunctionParameters["VkTeams_MessageID"];
  
  Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID);
  
  OPI_TestDataRetrieval.WriteLog(Result, "ForwardMessage (simple)", "VkTeams");
  
  Text = "Additional text";
  
  Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID, Text);
    
  oint vkteams ForwardMessage --token "001.3501506236.091..." --message "7402287649739767956" --fromid "689203963@chat.agent" --chatid "AoLI0egLWBSLR1Ngn2w" --text "Additional text"