mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-28 18:50:41 +00:00
fix(shell): satori: api: message.create
select direct forward
This commit is contained in:
parent
381cfcdbdb
commit
d66df3effd
@ -68,13 +68,15 @@ async function messageCreateUsingJson({
|
|||||||
| 'chronocat.internal.message.create2.markdown' =
|
| 'chronocat.internal.message.create2.markdown' =
|
||||||
'chronocat.internal.message.create2.normal'
|
'chronocat.internal.message.create2.normal'
|
||||||
|
|
||||||
const forwards = cctx.chronocat.h
|
const forwards =
|
||||||
.select(payloadRich.content, 'message')
|
// cctx.chronocat.h.select(payloadRich.content, 'message')
|
||||||
.filter((x) => x.attrs['forward'])
|
payloadRich.content
|
||||||
|
.filter((x) => x.type === 'message') // 直接子代而非所有子代
|
||||||
|
.filter((x) => x.attrs['forward'])
|
||||||
|
|
||||||
if (forwards.length) {
|
if (forwards.length) {
|
||||||
if (forwards.length > 1) {
|
if (forwards.length > 1) {
|
||||||
const err = `尚未支持单次请求发送多条「逐条转发」消息。来自 ${req.socket.remoteAddress}`
|
const err = `尚未支持单次请求发送多条转发消息。来自 ${req.socket.remoteAddress}`
|
||||||
|
|
||||||
cctx.chronocat.l.error(err, {
|
cctx.chronocat.l.error(err, {
|
||||||
code: 501,
|
code: 501,
|
||||||
|
Loading…
Reference in New Issue
Block a user