keybase-unofficial-local 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be2816388a3818987e46a0c9bbd33bbdc98e1505660b9a9f8c3931bde2af3141
4
- data.tar.gz: 31a26955a40bbc643c0394c6c008981b3ca7387d9d7d53a1de911726064bad0c
3
+ metadata.gz: ef81c10fe2347fb205221401d14cd6b172c85a576e952aada4ae5ed6f5017bd9
4
+ data.tar.gz: 73241b7f055b60f8bee7a6e9f2a6833ea7df36a8697030d5b8d3c033241020c3
5
5
  SHA512:
6
- metadata.gz: 6f8269532d1ce6fa013ec1cbf54515d1edf7157253eef42eaec87aae218a000b2d09b11a0da22cfe9ae57d14b5aa38cdd263d454b04b1b6a230d487dabee9318
7
- data.tar.gz: 1fd83f097e31a5435d7c4ee46affe825de3c54f2c995a7d37b859957fa125bd12f48cca55ecc03604d002dbfc94ef288ab2fd88f37b29650b2df3f79b31e3d32
6
+ metadata.gz: 07a4e99cbca0d93d30230cf4ea82afaffb302624e4525b60bef3074f224581c4805d1f6e51826fb2e71d7a0fbde506e073310785c35628925d6e431361f8d9c9
7
+ data.tar.gz: ca45b14a91363cc3a80e72c09f3447e5b5e9ab2cbd3ba0a602fb7aaaceb3078e4be90ca7955c3266eeeb5184505b58b7c7d88e35b69ea8062bf6d3e481ffe41e
@@ -14,7 +14,7 @@ module Keybase
14
14
  # The namespace for `keybase-unofficial-local`.
15
15
  module Local
16
16
  # The current version of `keybase-unofficial-local`.
17
- VERSION = "0.5.1"
17
+ VERSION = "0.6.0"
18
18
 
19
19
  extend Config
20
20
 
@@ -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.5.1
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-05-11 00:00:00.000000000 Z
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