You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the messages post endpoint allows for a markdown option. It would be great to add this as a parameter to the sendMessage function.
It looks like it would just need to be a change this:
send: (user, message, room) ->@robot.logger.debug"Sending message"@room_ids.forEach (room_id) =>@robot.logger.debug"send message to room #{room_id} with text #{message}"@spark.sendMessageroomId: room_id
text: message
to something like
send: (user, message, room, markdownText) ->@robot.logger.debug"Sending message"@room_ids.forEach (room_id) =>@robot.logger.debug"send message to room #{room_id} with text #{message}"@spark.sendMessageroomId: room_id
text: message
markdown: markdownText
Or would it make sense to pass the desired payload straight through? Something like:
send: (user, payload, room) ->@robot.logger.debug"Sending message"@room_ids.forEach (room_id) =>@robot.logger.debug"send message to room #{room_id} with text #{message}"@spark.sendMessage payload
Where payload is:
var payload = {"text": "Some text here",
"files": ["http://www.example.com/images/media.png"]
}
or
var payload = {"markdown": "Some `markdown` text **here**"}
I'm not sure if that would mess with the generic adapter though?
Thoughts?
Edit: Formatting fixes
The text was updated successfully, but these errors were encountered:
the messages post endpoint allows for a
markdown
option. It would be great to add this as a parameter to thesendMessage
function.It looks like it would just need to be a change this:
to something like
Or would it make sense to pass the desired payload straight through? Something like:
Where payload is:
or
I'm not sure if that would mess with the generic adapter though?
Thoughts?
Edit: Formatting fixes
The text was updated successfully, but these errors were encountered: