keybase-unofficial-local 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/keybase/local.rb +1 -1
- data/lib/keybase/local/chat.rb +28 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef81c10fe2347fb205221401d14cd6b172c85a576e952aada4ae5ed6f5017bd9
|
4
|
+
data.tar.gz: 73241b7f055b60f8bee7a6e9f2a6833ea7df36a8697030d5b8d3c033241020c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a4e99cbca0d93d30230cf4ea82afaffb302624e4525b60bef3074f224581c4805d1f6e51826fb2e71d7a0fbde506e073310785c35628925d6e431361f8d9c9
|
7
|
+
data.tar.gz: ca45b14a91363cc3a80e72c09f3447e5b5e9ab2cbd3ba0a602fb7aaaceb3078e4be90ca7955c3266eeeb5184505b58b7c7d88e35b69ea8062bf6d3e481ffe41e
|
data/lib/keybase/local.rb
CHANGED
data/lib/keybase/local/chat.rb
CHANGED
@@ -78,18 +78,44 @@ module Keybase
|
|
78
78
|
}
|
79
79
|
end
|
80
80
|
|
81
|
-
# Send a message to a conversation.
|
81
|
+
# Send a message to a conversation. For team-based conversations, see {send_team_message}.
|
82
82
|
# @param users [Array<String>] a list of the users in the conversation
|
83
83
|
# @param message [String] the message to send
|
84
84
|
# @param public [Boolean] whether to send the message to a public channel
|
85
|
+
# @param exploding_lifetime [String, nil] how long to wait before exploding the message,
|
86
|
+
# or nil to not explode it
|
85
87
|
# @return [OpenStruct] a struct mapping of the JSON response
|
86
88
|
# @raise [Exceptions::ChatError] if the chat call fails
|
87
|
-
def send_message(users, message, public: false)
|
89
|
+
def send_message(users, message, public: false, exploding_lifetime: nil)
|
88
90
|
chat_call :send, options: {
|
89
91
|
channel: {
|
90
92
|
name: Core::U[*users],
|
91
93
|
public: public,
|
92
94
|
},
|
95
|
+
exploding_lifetime: exploding_lifetime,
|
96
|
+
message: {
|
97
|
+
body: message,
|
98
|
+
},
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# Send a message to a team-based conversation. For conversations between individual users,
|
103
|
+
# see {send_message}.
|
104
|
+
# @param team [String] the name of the team to which the conversation belongs
|
105
|
+
# @param topic [String] the conversation's topic
|
106
|
+
# @param message [String] the message to send
|
107
|
+
# @param exploding_lifetime [String, nil] how long to wait before exploding the message,
|
108
|
+
# or nil to not explode it
|
109
|
+
# @return [OpenStruct] a struct mapping of the JSON response
|
110
|
+
# @raise [Exceptions::ChatError] if the chat call fails
|
111
|
+
def send_team_message(team, topic, message, exploding_lifetime: nil)
|
112
|
+
chat_call :send, options: {
|
113
|
+
channel: {
|
114
|
+
name: team,
|
115
|
+
members_type: "team",
|
116
|
+
topic_name: topic,
|
117
|
+
},
|
118
|
+
exploding_lifetime: exploding_lifetime,
|
93
119
|
message: {
|
94
120
|
body: message,
|
95
121
|
},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keybase-unofficial-local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: keybase-unofficial-core
|