pinecall 0.11.48 → 0.11.49
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 +5 -0
- data/lib/pinecall/flows.rb +13 -0
- data/lib/pinecall/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: dde422389671de8ee487daaded827a5e1a254759e97178108642468fef25c749
|
|
4
|
+
data.tar.gz: bf96e3b082ab0db8b16e4760a867f5dcc16ff49a240ff4695d76f7545f51de48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5458beb59a9aa409fee120059015cbe42c19401d89e709c03563dd524321f084e4697a1f57d2e283c3abecd3c26927a12806291f22239b85cf53c67a0f1ab6f6
|
|
7
|
+
data.tar.gz: d344d854156f541baca348bb14f8ab54183e583a9f9c7ceb171196d2d23263552e2dbb92dbdfe8d2e7b4e0038273ebf32b98e7c8849d55fdbdf4f6844324d40f
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ Every change a person using this gem would notice. The format is
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version numbers and tags are the
|
|
5
5
|
maintainer's call.
|
|
6
6
|
|
|
7
|
+
## [0.11.49] — a flow writes to somebody by SMS, and an open written conversation reads as open (2026-11-18)
|
|
8
|
+
|
|
9
|
+
- **`step.text(to, Agent, words)`**: a flow has an agent send a contact one SMS first, from a number it answers SMS
|
|
10
|
+
at (`from:`), and reads what it came to as a `Texted`: `sent`, the `call` it was said on, or what `refused` it.
|
|
11
|
+
|
|
7
12
|
## [0.11.48] — an agent writes first by SMS, and a person's message on a thread reaches the contact (2026-11-18)
|
|
8
13
|
|
|
9
14
|
- Released with the runtime: nothing of this package changed.
|
data/lib/pinecall/flows.rb
CHANGED
|
@@ -13,6 +13,9 @@ module Pinecall
|
|
|
13
13
|
# What a call a flow placed came to; `refused` names why nothing rang.
|
|
14
14
|
Called = Data.define(:answered, :reason, :call, :refused, :message)
|
|
15
15
|
|
|
16
|
+
# What a text a flow sent came to; `refused` names why nothing was sent.
|
|
17
|
+
Texted = Data.define(:sent, :call, :from, :refused, :message)
|
|
18
|
+
|
|
16
19
|
# Where a stretch of a run left it; a failed one says what its function raised.
|
|
17
20
|
Advanced = Data.define(:status, :error)
|
|
18
21
|
|
|
@@ -117,6 +120,16 @@ module Pinecall
|
|
|
117
120
|
message: said[:message])
|
|
118
121
|
end
|
|
119
122
|
|
|
123
|
+
# Have an agent send a contact one SMS first, from a number it answers SMS at.
|
|
124
|
+
def text(to, agent, words, from: nil)
|
|
125
|
+
slug = @slug_of.call(agent)
|
|
126
|
+
raise DeclarationRefused, "#{@flow.name}: #{agent} is no agent this process serves" if slug.nil?
|
|
127
|
+
|
|
128
|
+
said = waited("text", { agent: slug, to:, text: words, from: }.compact) || {}
|
|
129
|
+
Texted.new(sent: said[:sent] == true, call: said[:call], from: said[:from], refused: said[:refused],
|
|
130
|
+
message: said[:message])
|
|
131
|
+
end
|
|
132
|
+
|
|
120
133
|
# Wait for an event of the app whose data has what `match` names; nil when it gave up.
|
|
121
134
|
def wait_for(event, match: nil, within: nil)
|
|
122
135
|
asked = { event:, match: }.compact
|
data/lib/pinecall/version.rb
CHANGED