Skip to content

Commit

Permalink
Merge branch 'v2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
atorber committed Dec 6, 2023
2 parents 55d2abd + fc43960 commit 3fc0d9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ npm install
```.env
# 维格表配置
VIKA_SPACE_NAME="" # 维格表空间名称,注意是名称而不是ID
VIKA_TOKEN="" #维格表token
VIKA_SPACE_ID="替换为自己的维格表空间ID"
VIKA_TOKEN="替换为自己的维格表token"
# 基础配置
ADMINROOM_ADMINROOMTOPIC="瓦力是群主" # 管理群名称,需尽量保持名称复杂,避免重名群干扰
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atorber/chatflow",
"version": "2.0.56",
"version": "2.0.57",
"description": "ChatFlow-聊天机器人管理平台",
"type": "module",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions src/api/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export const formatMessageToMQTT = async (message: Message) => {
delete roomJson.payload.memberIdList
}
const messageType = types.Message[message.type()]
let text = ''
let text = message.text()
switch (message.type()) {
case types.Message.Image:{
const file = message.toImage()
Expand All @@ -389,7 +389,7 @@ export const formatMessageToMQTT = async (message: Message) => {
break
}
log.info('formatMessageToMQTT text:', text)
const timestamp = message.payload?.timestamp ? (message.payload.timestamp * 1000) : new Date().getTime()
const timestamp = message.payload?.timestamp ? message.payload.timestamp : new Date().getTime()
const messageNew = {
_id: message.id,
data: message,
Expand Down
11 changes: 2 additions & 9 deletions src/api/talk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const createTalk = (_params: {
draft_text: '',
msg_text: '',
index_name: '',
created_at: 11111,
created_at: new Date().getTime(),
}
return data
}
Expand Down Expand Up @@ -222,14 +222,7 @@ export const getTalkRecord = async (param: {
const dispayname = alias || name
const talk_type = roomid !== '--' ? 2 : 1
let msg_type = 1
let extra = {
height: 6480,
name: '',
size: 0,
suffix: '',
url: 'https://im.gzydong.com/public/media/image/common/20231026/814423dea6ada99994ae87bb0fef545b_4480x6480.png',
width: 4480,
}
let extra = {}
const receiver_id = roomid !== '--' ? roomid : listenerid
if (file) {
const file0 = file[0]
Expand Down

0 comments on commit 3fc0d9d

Please sign in to comment.