Skip to content

Commit 5996040

Browse files
fix(googlechat): set messageReplyOption fallback to new thread (#359)
Since the default MessageReplyOption is set to `MESSAGE_REPLY_OPTION_UNSPECIFIED`, which ignores thread ID and threadKey, set it to `REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD` to ensure replies fallback to a new thread when threadKey is provided. reference: https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create Signed-off-by: knowlet <[email protected]> Co-authored-by: Pasha Kostohrys <[email protected]>
1 parent 9cb5771 commit 5996040

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/services/googlechat.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (c *googlechatClient) sendMessage(message *googleChatMessage, threadKey str
131131
if threadKey != "" {
132132
q := u.Query()
133133
q.Add("threadKey", threadKey)
134+
q.Add("messageReplyOption", "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD")
134135
u.RawQuery = q.Encode()
135136
}
136137
response, err := c.httpClient.Post(u.String(), "application/json", bytes.NewReader(jsonMessage))

0 commit comments

Comments
 (0)