kenken999 commited on
Commit
62bf455
1 Parent(s): c7b2c45
Files changed (1) hide show
  1. mysite/interpreter/google_chat.py +4 -0
mysite/interpreter/google_chat.py CHANGED
@@ -1,6 +1,10 @@
1
  import requests
2
  import json
3
 
 
 
 
 
4
  def send_google_chat_card(webhook_url, title, subtitle, link_text, link_url):
5
  headers = {
6
  'Content-Type': 'application/json; charset=UTF-8'
 
1
  import requests
2
  import json
3
 
4
+ def convert_newlines_to_google_chat_format(text):
5
+ # 改行文字を <br> タグに置き換える
6
+ return text.replace('\\n', '\\\n')
7
+
8
  def send_google_chat_card(webhook_url, title, subtitle, link_text, link_url):
9
  headers = {
10
  'Content-Type': 'application/json; charset=UTF-8'