chat_sdk-teams 0.4.0 → 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 +4 -4
- data/lib/chat_sdk/teams/adapter.rb +7 -28
- data/lib/chat_sdk/teams/bot_framework_client.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5077208fda83c5941a590c7daa94b0d821399dcd49d92f3b5368498cd7e30f0b
|
|
4
|
+
data.tar.gz: 6271ccca3f36db8cadb455bfa47ead36eccf5ab6b6363edc39342d223f39979d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a219d54aa4725525307540f3fec911ce6c956f3421faf2ba88ac2ab672972a46509b85128d044b1f8d48152ffe52973a3e241c5bc3a047c110edfef3f607ebd
|
|
7
|
+
data.tar.gz: 19555fa3ae535a42cf93ebd79e3e7695221648880d19d42d2a1562550b29085db991f630a12f4b60424074a85941fb4c485bf4e6f67f39ffbb4025223289840e
|
|
@@ -4,7 +4,7 @@ module ChatSDK
|
|
|
4
4
|
module Teams
|
|
5
5
|
class Adapter < ChatSDK::Adapter::Base
|
|
6
6
|
capabilities :edit_messages, :delete_messages, :threads, :direct_messages,
|
|
7
|
-
:
|
|
7
|
+
:file_uploads, :streaming_edit, :typing_indicator
|
|
8
8
|
|
|
9
9
|
attr_reader :client
|
|
10
10
|
|
|
@@ -129,24 +129,6 @@ module ChatSDK
|
|
|
129
129
|
)
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
def add_reaction(channel_id:, message_id:, emoji:)
|
|
133
|
-
require_capability!(:reactions)
|
|
134
|
-
# Teams Bot Framework API does not support adding reactions programmatically
|
|
135
|
-
# The capability is declared because inbound reactions are parsed
|
|
136
|
-
raise ChatSDK::PlatformError.new(
|
|
137
|
-
"Teams Bot Framework API does not support adding reactions programmatically",
|
|
138
|
-
adapter_name: :teams
|
|
139
|
-
)
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
def remove_reaction(channel_id:, message_id:, emoji:)
|
|
143
|
-
require_capability!(:reactions)
|
|
144
|
-
raise ChatSDK::PlatformError.new(
|
|
145
|
-
"Teams Bot Framework API does not support removing reactions programmatically",
|
|
146
|
-
adapter_name: :teams
|
|
147
|
-
)
|
|
148
|
-
end
|
|
149
|
-
|
|
150
132
|
def open_dm(user_id)
|
|
151
133
|
require_capability!(:direct_messages)
|
|
152
134
|
# To open a DM, we need a service URL. Use the first cached one.
|
|
@@ -170,19 +152,16 @@ module ChatSDK
|
|
|
170
152
|
conversation_id
|
|
171
153
|
end
|
|
172
154
|
|
|
173
|
-
def fetch_messages(channel_id:, thread_id: nil, cursor: nil, limit: 50)
|
|
174
|
-
require_capability!(:message_history)
|
|
175
|
-
# Teams Bot Framework doesn't provide a message history API
|
|
176
|
-
# Return empty to satisfy the interface
|
|
177
|
-
[[], nil]
|
|
178
|
-
end
|
|
179
|
-
|
|
180
155
|
def open_modal(trigger_id:, modal:)
|
|
181
|
-
super
|
|
156
|
+
super
|
|
182
157
|
end
|
|
183
158
|
|
|
184
159
|
def start_typing(channel_id:, thread_id: nil)
|
|
185
|
-
|
|
160
|
+
service_url = service_url_for(channel_id)
|
|
161
|
+
@client.send_typing(
|
|
162
|
+
service_url: service_url,
|
|
163
|
+
conversation_id: channel_id
|
|
164
|
+
)
|
|
186
165
|
end
|
|
187
166
|
|
|
188
167
|
def mention(user_id)
|
|
@@ -35,6 +35,11 @@ module ChatSDK
|
|
|
35
35
|
authorized_request(:post, url, payload)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def send_typing(service_url:, conversation_id:)
|
|
39
|
+
activity = {"type" => "typing"}
|
|
40
|
+
send_activity(service_url: service_url, conversation_id: conversation_id, activity: activity)
|
|
41
|
+
end
|
|
42
|
+
|
|
38
43
|
def get_conversation_members(service_url:, conversation_id:)
|
|
39
44
|
url = "#{service_url.chomp("/")}/v3/conversations/#{conversation_id}/members"
|
|
40
45
|
authorized_request(:get, url)
|