Skip to content

Commit fe0fa04

Browse files
authored
Define Chatops::THREAD_STYLES
ChatopsRPC has been updated to support thread styles, which allows a Chatops RPC call to reply either in the channel, in a thread of the original message, or both.
1 parent a5eedad commit fe0fa04

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/chatops.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
module Chatops
2+
# THREAD_STYLES defines the various thread styles available to Hubot Chatops RPC.
3+
# https://github.com/github/hubot-classic/blob/master/docs/rpc_chatops_protocol.md#executing-commands
4+
THREAD_STYLES = {
5+
# Channel thread style is a standard in-channel reply.
6+
channel: 0,
7+
# Threaded thread style will send the reply to a thread from the original message.
8+
threaded: 1,
9+
# Threaded and channel thread style will send the reply to a thread from the original message,
10+
# and post an update into the channel as well (helpful when the original message in the thread is old).
11+
threaded_and_channel: 2,
12+
}.freeze
13+
214
def self.public_key
315
ENV[public_key_env_var_name]
416
end

0 commit comments

Comments
 (0)