Microsoft Teams escaping underscores in text

I have following function in Ruby to send aws logs to microsoft team channel through webhook. Some text contains underscore signs like connection_web but appears like connectionweb in MS teams. How to get the exact output ?

require 'json'
require 'net/https'
require 'uri'
require 'base64'
require 'zlib'
require 'stringio'
def lambda_handler(event:, context:)
  log_event = JSON.parse(decode_and_decompress(event["awslogs"]["data"]))
  response = speak(messages_from_blob(log_event))
  puts response.body
def speak(message)
  http ="", 443)
  http.use_ssl = true
  request =["HOOK_URL"])
  request.body = JSON.generate({
    text: message
def decode_and_decompress(input)
  binary_compressed = Base64.decode64(input)
  gz =
def messages_from_blob(event_data)
    .map{ |e| e["message"] }

Anybody please update this thread ?

Any one can help out ?

This question is not at all about rails, I fear. You can likely get better answers on a general purpose Q&A site, where you will get more eyeballs on your problem. A questions site I’ve heard about is stackoverflow, people tells me it kind of works…