Showing
1 changed file
with
2 additions
and
17 deletions
... | @@ -15,13 +15,7 @@ const multiCheckMamul = (client) => { | ... | @@ -15,13 +15,7 @@ const multiCheckMamul = (client) => { |
15 | for (let i = 0, pending = Promise.resolve(); i < keywords.length; i++) { | 15 | for (let i = 0, pending = Promise.resolve(); i < keywords.length; i++) { |
16 | pending = db.getUsersByKeyword(keywords[i]).then((userIds) => { | 16 | pending = db.getUsersByKeyword(keywords[i]).then((userIds) => { |
17 | marketMultiSearch(keywords[i]).then((res) => { | 17 | marketMultiSearch(keywords[i]).then((res) => { |
18 | - client.multicast(userIds, [ | 18 | + client.multicast(userIds, [setCarouselMessage(res, keywords[i])]); |
19 | - { | ||
20 | - type: "text", | ||
21 | - text: `유저님의 ${keywords[i]} 매물 알림이 도착했어요!`, | ||
22 | - }, | ||
23 | - setCarouselMessage(res, keywords[i]), | ||
24 | - ]); | ||
25 | }); | 19 | }); |
26 | }); | 20 | }); |
27 | } | 21 | } |
... | @@ -32,16 +26,7 @@ const checkMamul = (client, userId) => { | ... | @@ -32,16 +26,7 @@ const checkMamul = (client, userId) => { |
32 | db.getKeywordsByUserId(userId).then((keywords) => { | 26 | db.getKeywordsByUserId(userId).then((keywords) => { |
33 | for (let i = 0, pending = Promise.resolve(); i < keywords.length; i++) { | 27 | for (let i = 0, pending = Promise.resolve(); i < keywords.length; i++) { |
34 | pending = marketMultiSearch(keywords[i]).then((res) => { | 28 | pending = marketMultiSearch(keywords[i]).then((res) => { |
35 | - client.multicast( | 29 | + client.multicast([userId], [setCarouselMessage(res, keywords[i])]); |
36 | - [userId], | ||
37 | - [ | ||
38 | - { | ||
39 | - type: "text", | ||
40 | - text: `유저님의 ${keywords[i]} 매물 알림이 도착했어요!`, | ||
41 | - }, | ||
42 | - setCarouselMessage(res, keywords[i]), | ||
43 | - ] | ||
44 | - ); | ||
45 | }); | 30 | }); |
46 | } | 31 | } |
47 | }); | 32 | }); | ... | ... |
-
Please register or login to post a comment