Skip to content

Commit

Permalink
move reactions(var)
Browse files Browse the repository at this point in the history
  • Loading branch information
sho0126hiro committed Mar 21, 2023
1 parent 049520c commit 3887943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/internal/repository/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ func (r *slackRepository) GetParentMessage(ctx context.Context, channelID, ts st
return nil, errors.New("number of messages is zero")
}
parentMessage := msgs[0]
var reactions []*model.SlackReaction
if r.isIncompleteReaction(parentMessage.Reactions) {
// get full reactions
parentMessage.Reactions, err = r.client.GetReaction(ctx, channelID, ts, true)
if err != nil {
return nil, err
}
}
var reactions []*model.SlackReaction
for _, reaction := range parentMessage.Reactions {
reactions = append(reactions, &model.SlackReaction{
Name: reaction.Name,
Expand Down

0 comments on commit 3887943

Please sign in to comment.