twi 0.3.2 → 0.3.4
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/CHANGELOG.md +8 -0
- data/lib/twi/conversation.rb +4 -4
- data/lib/twi/message.rb +1 -1
- data/lib/twi/version.rb +1 -1
- 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: 6e8f3fca6e42b3f731d96f1f5ed8c8a8227b3cdfddd67ab208f1617b611ddec8
|
|
4
|
+
data.tar.gz: 31275ab88e2107cfc15dcbaa764f793a06858a546f67ceead7bb6247808038ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 490faad79c0c998c04523a92cd8438f9adea3caf1e1e5f7efd0afc711e1e5275f7fae463b4736bd4d3218624f7838665ae68002aad33fc80cf25ef436d0d0770
|
|
7
|
+
data.tar.gz: faf28b58e820cfff88c68cc9b504a2b6a343a928be4996b3981709f63fd17dcc736ad8ad3a32f816a8604440bce1d52621c50e05a934632c12b1bfa6ef300e31
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [0.3.4] - 2026-06-01
|
|
2
|
+
|
|
3
|
+
- [Fix] Fix params of Twi::Error
|
|
4
|
+
|
|
5
|
+
## [0.3.3] - 2026-06-01
|
|
6
|
+
|
|
7
|
+
- [Fix] Use newer console URL for Twi::Conversation.url
|
|
8
|
+
|
|
1
9
|
## [0.3.2] - 2026-06-01
|
|
2
10
|
|
|
3
11
|
- [New] Add Twi::Message.url_for, Twi::Delivery.url_for, Twi::Delivery.unsubscribed?
|
data/lib/twi/conversation.rb
CHANGED
|
@@ -12,8 +12,8 @@ module Twi
|
|
|
12
12
|
@status = conversation.state
|
|
13
13
|
rescue Twilio::REST::RestError => error
|
|
14
14
|
case error.code
|
|
15
|
-
when 50438 then raise ExistingConversationError.new(error.error_message)
|
|
16
|
-
when 50214 then raise TooManyConversationsError.new(error.error_message)
|
|
15
|
+
when 50438 then raise ExistingConversationError.new(code: error.code, message: error.error_message)
|
|
16
|
+
when 50214 then raise TooManyConversationsError.new(code: error.code, message: error.error_message)
|
|
17
17
|
else raise
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -31,8 +31,8 @@ module Twi
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def url
|
|
34
|
-
url = "/console/conversations/services/#{Twi.lio.conversation_sid}/conversations/#{id}
|
|
35
|
-
query = "
|
|
34
|
+
url = "/console/conversations/services/#{Twi.lio.conversation_sid}/conversations/#{id}"
|
|
35
|
+
query = "frameUrl=#{CGI.escape url}"
|
|
36
36
|
"https://console.twilio.com/us1/develop/conversations/manage/services?#{query}"
|
|
37
37
|
end
|
|
38
38
|
|
data/lib/twi/message.rb
CHANGED
|
@@ -46,7 +46,7 @@ module Twi
|
|
|
46
46
|
@id = message.sid
|
|
47
47
|
@status = message.status
|
|
48
48
|
rescue Twilio::REST::RestError => error
|
|
49
|
-
raise Error, error
|
|
49
|
+
raise Error, code: error.code, message: error.error_message
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# @return [Hash] the shape of the payload send by Twilio to the callback URL.
|
data/lib/twi/version.rb
CHANGED