Skip to content

Commit

Permalink
add support for removing tapbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
trek-boldly-go committed Feb 4, 2024
1 parent db981ec commit 02f7ea9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion imessage/bluebubbles/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,11 +985,17 @@ func (bb *blueBubbles) SendFileCleanup(sendFileDir string) {
func (bb *blueBubbles) SendTapback(chatID, targetGUID string, targetPart int, tapback imessage.TapbackType, remove bool) (*imessage.SendResponse, error) {
bb.log.Trace().Str("chatID", chatID).Str("targetGUID", targetGUID).Int("targetPart", targetPart).Interface("tapback", tapback).Bool("remove", remove).Msg("SendTapback")

var tapbackName = tapback.Name()

if remove {
tapbackName = "-" + tapbackName
}

request := SendReactionRequest{
ChatGUID: chatID,
SelectedMessageGuid: targetGUID,
PartIndex: targetPart,
Reaction: tapback.Name(),
Reaction: tapbackName,
}

var res SendReactionResponse
Expand Down

0 comments on commit 02f7ea9

Please sign in to comment.