Skip to content

Commit

Permalink
(分享)卡片式链接 增加extra,包含更多数据
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Aug 11, 2024
1 parent 3470b6b commit 8727c28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pywxdump/db/dbMSG.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def get_msg_detail(self, row):

msg = StrContent
src = ""
extra = {}

if type_id == (1, 0): # 文本
msg = StrContent
Expand Down Expand Up @@ -163,6 +164,7 @@ def get_msg_detail(self, row):
url = appmsg.get("url", "")
msg = f'{title}\n{des}\n\n<a href="{url}" target="_blank">点击查看详情</a>'
src = url
extra = appmsg

elif type_id == (49, 19): # 合并转发的聊天记录
CompressContent = decompress_CompressContent(CompressContent)
Expand Down Expand Up @@ -249,7 +251,7 @@ def get_msg_detail(self, row):
talker = StrTalker

row_data = {"id": _id, "MsgSvrID": str(MsgSvrID), "type_name": type_name, "is_sender": IsSender,
"talker": talker, "room_name": StrTalker, "msg": msg, "src": src, "extra": {},
"talker": talker, "room_name": StrTalker, "msg": msg, "src": src, "extra": extra,
"CreateTime": CreateTime, }
return row_data

Expand Down

0 comments on commit 8727c28

Please sign in to comment.