/// <summary> /// Sends a message to a thread /// </summary> /// <param name="message">Message to send</param> /// <returns>Message ID of the sent message</returns> public async Task <string> send(FB_Message message = null) { /* * Sends a message to a thread * :param message: Message to send * :type message: models.Message * :return: :ref:`Message ID <intro_message_ids>` of the sent message * :raises: FBchatException if request failed */ var data = this._to_send_data(); data.update(message._to_send_data()); return(await this.session._do_send_request(data)); }
private async Task <dynamic> _sendLocation( FB_LocationAttachment location, bool current = true, FB_Message message = null ) { var data = this._to_send_data(); if (message != null) { data.update(message._to_send_data()); } data["action_type"] = "ma-type:user-generated-message"; data["location_attachment[coordinates][latitude]"] = location.latitude; data["location_attachment[coordinates][longitude]"] = location.longitude; data["location_attachment[is_current_location]"] = current; return(await this.session._do_send_request(data)); }