Skip to content

Commit

Permalink
Revert "feat: 支援回覆訊息功能"
Browse files Browse the repository at this point in the history
This reverts commit 80a62b5.
  • Loading branch information
hanshino committed Sep 26, 2023
1 parent 9d903f0 commit 9edfb27
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,52 +369,6 @@ function Nothing(context) {

async function App(context) {
traffic.recordPeople(context);

context.replyText = function (...args) {
const { quoteToken } = context.event.message;
const [text] = args;
let replyObject = {};

const textType = typeof text;

if (textType === "string") {
replyObject = [
{
type: "text",
text,
quoteToken,
},
];
} else if (Array.isArray(text)) {
replyObject = text.map((t, index) => {
let reply;
if (typeof t === "string") {
reply = {
type: "text",
text: t,
};
} else if (typeof t === "object") {
reply = {
...t,
};
}

if (index === 0) {
reply.quoteToken = quoteToken;
}

return reply;
});
} else if (textType === "object") {
replyObject = {
...text,
quoteToken,
};
}

return context.reply(replyObject);
};

return chain([
setProfile, // 設置各式用戶資料
statistics, // 數據蒐集
Expand Down

0 comments on commit 9edfb27

Please sign in to comment.