diff --git a/app/pkg/slack/client.go b/app/pkg/slack/client.go index 18eddad..1a484ac 100644 --- a/app/pkg/slack/client.go +++ b/app/pkg/slack/client.go @@ -28,6 +28,7 @@ type Client interface { PostEphemeral(ctx context.Context, channelID, userID, ts, message string) error GetConversationReplies(ctx context.Context, channelID, ts string) ([]slack.Message, error) GetUsersInfo(ctx context.Context, userID ...string) (*[]slack.User, error) + GetReaction(ctx context.Context, channelID, ts string, full bool) ([]slack.ItemReaction, error) GetClient() *slack.Client GetAppUserID() string @@ -118,6 +119,15 @@ func (c *client) GetUsersInfo(ctx context.Context, userID ...string) (*[]slack.U return users, nil } +func (c *client) GetReaction(ctx context.Context, channelID, ts string, full bool) ([]slack.ItemReaction, error) { + return c.Client.GetReactionsContext(ctx, slack.ItemRef{ + Channel: channelID, + Timestamp: ts, + }, slack.GetReactionsParameters{ + Full: full, + }) +} + func (c *client) GetClient() *slack.Client { return c.Client } diff --git a/app/pkg/slack/hoge_test.go b/app/pkg/slack/hoge_test.go deleted file mode 100644 index 4b3b8cf..0000000 --- a/app/pkg/slack/hoge_test.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2023 Money Forward, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package slack