1 parent
b3f9e7b642
commit
b02d2000d8
2 files changed
+14
-2
No files matched your search
+8
-2
@@ -31,6 +31,7 @@ def parse_history_message(data):
|
|||||||
if sender_id != sender_id_item:
|
if sender_id != sender_id_item:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
item_content = json.loads(item.get("body").get("content"))
|
item_content = json.loads(item.get("body").get("content"))
|
||||||
|
|
||||||
message_id = item.get("message_id")
|
message_id = item.get("message_id")
|
||||||
@@ -57,6 +58,9 @@ def parse_history_message(data):
|
|||||||
"image_id": tmp_content_data_item.get("image_key"),
|
"image_id": tmp_content_data_item.get("image_key"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
continue
|
||||||
|
|
||||||
print(message_content_data)
|
print(message_content_data)
|
||||||
print(message_images_data)
|
print(message_images_data)
|
||||||
@@ -294,7 +298,11 @@ def process_new_robot(app_id, app_secret, action_data):
|
|||||||
robot_uuid = new_blank_activity(name, user_id)
|
robot_uuid = new_blank_activity(name, user_id)
|
||||||
catagory_table_record["分类"] = "官方指令"
|
catagory_table_record["分类"] = "官方指令"
|
||||||
catagory_table_record["UUID"] = robot_uuid
|
catagory_table_record["UUID"] = robot_uuid
|
||||||
|
# 在开发计划中创建记录
|
||||||
|
|
||||||
|
table_id = "tblvjiV4HB31FMgb"
|
||||||
|
catagory_table_record = {"RobotUuid": robot_uuid}
|
||||||
|
add_record(client, bitable_token, table_id, catagory_table_record)
|
||||||
else:
|
else:
|
||||||
# 其他选项不创建记录
|
# 其他选项不创建记录
|
||||||
return
|
return
|
||||||
@@ -311,5 +319,3 @@ def process_new_robot(app_id, app_secret, action_data):
|
|||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
add_record(client, bitable_token, table_id, catagory_table_record)
|
add_record(client, bitable_token, table_id, catagory_table_record)
|
||||||
|
|
||||||
# 在开发计划中创建记录
|
|
||||||
@@ -312,3 +312,9 @@ if __name__ == "__main__":
|
|||||||
.log_level(lark.LogLevel.DEBUG)
|
.log_level(lark.LogLevel.DEBUG)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
table_id = "tblvjiV4HB31FMgb"
|
||||||
|
|
||||||
|
catagory_table_record = {"RobotUuid": "2d8182fb-ecf1-4931-991a-543312384b6b"}
|
||||||
|
|
||||||
|
add_record(client, bitable_token, table_id, catagory_table_record)
|
||||||
Reference in new issue
Block a user