Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

[chore] Upgrade dependencies #26

Merged
merged 5 commits into from
Jul 30, 2021
Merged

[chore] Upgrade dependencies #26

merged 5 commits into from
Jul 30, 2021

Conversation

hi-se
Copy link
Contributor

@hi-se hi-se commented Jul 30, 2021

@slack/boltと@hi-se/web-apiのアップデートが主目的。
ライブラリのアップデートに伴ってコードを少し修正。

ついでに他のライブラリも最新のバージョンにアップデートした。

// 公式が提供しているAppMentionEvent型では足りないプロパティがあるためGenericMessageEvent型を利用している
// see https://github.com/siiibo/shujinosuke/pull/16#discussion_r642349045
handleAppMention(client, event as unknown as GenericMessageEvent);
handleAppMention(client, event as AppMentionEvent);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以前AppMentionEventにeditedがない状況について、 @slack/bolt の issueにて拙い英語で質問したところ、バグだということで修正していただけました。(どうせなら自分で修正してプルリク投げれば良かった...)

GenericMessageEventを使う必要がなくなったので代用してた部分を全て修正。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すばらしい!!!
slackapi/bolt-js#960 ですね、GJ 👍

if ((await client.users.getPresence({ user: remindTarget })).presence === 'active') {
if (client.users.getPresence({ user: remindTarget }).presence === 'active') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slack clientをGAS用に置き換えた際、不要なPromiseが残ってしまっていたためここでaync/awaitを利用していました。

hi-se/gas-slack-sdk@e5964bf で対応したので、こちらも合わせて修正。

@hi-se hi-se merged commit ed16d8b into master Jul 30, 2021
@hi-se hi-se deleted the upgrade_dependencies branch July 30, 2021 05:29
@hi-se hi-se restored the upgrade_dependencies branch July 30, 2021 05:31
@hi-se hi-se deleted the upgrade_dependencies branch July 30, 2021 05:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants