Toggle navigation
Toggle navigation
This project
Loading...
Sign in
윤준석
/
mamuri-bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
유명현
2022-05-30 18:50:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
087d80ffb3054b7841a4d138f672dd8fc4713535
087d80ff
1 parent
33be809a
EDIT: Refactor unessential code
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
server/chatbot/message/setCarouselMessage.js
server/chatbot/message/setCarouselMessage.js
View file @
087d80f
...
...
@@ -61,8 +61,6 @@ function setCarouselMessage(mamuls, keyword) {
mamuls
[
i
][
"extraInfo"
]
=
mamuls
[
i
][
"extraInfo"
].
slice
(
0
,
searchDot
);
}
}
console
.
log
(
`unparsed extraInfo : \n
${
mamuls
[
i
][
"extraInfo"
]}
`
);
let
searchValue
=
"\n"
;
let
pos
=
0
;
let
foundPos
=
0
;
...
...
@@ -74,25 +72,12 @@ function setCarouselMessage(mamuls, keyword) {
if
(
foundPos
!==
-
1
)
{
mamuls
[
i
][
"extraInfo"
]
=
mamuls
[
i
][
"extraInfo"
].
slice
(
0
,
foundPos
)
+
"\n..."
;
console
.
log
(
`parsed extraInfo : \n
${
mamuls
[
i
][
"extraInfo"
]}
`
);
}
if
(
mamuls
[
i
][
"extraInfo"
].
length
>
40
)
{
mamuls
[
i
][
"extraInfo"
]
=
mamuls
[
i
][
"extraInfo"
].
slice
(
0
,
40
)
+
"\n..."
;
console
.
log
(
`parsed extraInfo : \n
${
mamuls
[
i
][
"extraInfo"
]}
`
);
}
}
// } else if (mamuls[i]["extraInfo"].length > 70) {
// mamuls[i]["extraInfo"] = mamuls[i]["extraInfo"].slice(0, 70) + "\n...";
// } else {
// }
// else if (mamuls[i]["extraInfo"].indexOf("\n") !== -1) {
// console.log(mamuls[i]["extraInfo"].indexOf("\n", 4));
// let slicePoint = mamuls[i]["extraInfo"].indexOf("\n", 4);
// mamuls[i]["extraInfo"] =
// mamuls[i]["extraInfo"].slice(0, slicePoint) + "\n...";
// }
flexMessage
=
setFlexMessage
(
mamuls
[
i
][
"platform"
],
...
...
Please
register
or
login
to post a comment