Lastorder-DC / chatreader-kor

채팅 읽어주는 로봇
https://lastorder.xyz/chatreader-kor/speech.html
MIT License
16 stars 11 forks source link

Fix #54 userstate.emotes를 string으로 취급하던 문제 수정 #59

Closed dmc31a42 closed 2 years ago

dmc31a42 commented 2 years ago

심각도: 보통

userstate.emotes를 string으로 취급하던 문제 수정하였습니다. (#54) 아래 결과와 같이 userstate.emotes는 Object이고 userstate['emotes-raw']가 string입니다.

{
  "emotes": {
    "86": [
      "0-9"
    ],
    "64138": [
      "11-19"
    ],
    "303179118": [
      "24-33"
    ],
    "303179119": [
      "35-42"
    ],
    "555555584": [
      "21-22"
    ]
  },
  "emotes-raw": "303179118:24-33/303179119:35-42/86:0-9/64138:11-19/555555584:21-22",
}

그리고 emotes가 없을 때에는 null이고 기존의 코드에 이에 대한 처리가 있어서 별도의 nullish 병합 연산자는 적용하지 않았습니다.

{
  "emotes": null,
  "emotes-raw": null
}

https://github.com/Lastorder-DC/chatreader-kor/blob/050754b7f72dfbfa61f9b525b0e0d1eb596ebf10/tts.js#L731-L735

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lastorder-dc/chatreader-kor/36B4bhLeci1M5CE7RwwBKARR2SAy
✅ Preview: https://chatreader-kor-git-fork-dmc31a42-pr-emotes-f17bea-lastorder-dc.vercel.app