오픈채팅 질문드립니다.
#344
-
안녕하세요. 오픈채팅에서 1:1 대화를 요청하는 방법에 대하여 질문드립니다. 1:1 대화가 가능한지 확인하는 방법과 만약 가능하다면 해당 사용자에게 1:1 대화를 요청하는 방법을 질문드립니다. 항상 감사합니다. |
Beta Was this translation helpful? Give feedback.
Answered by
raravel
May 27, 2021
Replies: 1 comment 9 replies
-
node-kakao/src/openlink/open-link-user-info.ts Lines 27 to 59 in b399e23
node-kakao/src/talk/openlink/talk-open-channel-list.ts Lines 302 to 312 in b399e23 위 함수를 사용하여 채널에 들어갈 수 있습니다. 다음은 제가 테스트한 예제입니다. const client = await login(...);
const openChannelList = client.channelList.open;
const latestLinkList = (await openChannelList.allClientLink());
const clientOpenLinkList = (await openChannelList.getLatestLinkList()).result;
client.on('chat', async (chat, channel) => {
const sender = chat.getSenderInfo(channel);
if ( sender.profileType === 16 ) {
const openLink = clientOpenLinkList[0].openLink;
const { result } = await openChannelList.joinChannel({ linkId: sender.linkId }, openLink);
result.sendChat('TEST');
}
}); |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
raravel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node-kakao/src/openlink/open-link-user-info.ts
Lines 27 to 59 in b399e23
profileType
을 참고하여OPEN_PROF…