Skip to content

Releases: vapor-community/VaporTwilioService

Support for Vapor 4

03 Mar 08:05
7b235a4
Compare
Choose a tag to compare
Merge pull request #9 from MihaelIsaev/master

Upgrade to Vapor4 🚀

Escape Message Bodies

15 Feb 18:37
9a137b5
Compare
Choose a tag to compare

Message bodies are now escaped

Vapor Hotfix Hotfix

14 Feb 22:08
8457fef
Compare
Choose a tag to compare
Merge pull request #5 from MihaelIsaev/master

Fix client.post call

Renamed Targets

19 Jan 01:26
Compare
Choose a tag to compare

The target names being used for the example app were clashing with folks projects. Should be fine now.

Handling Incoming Texts

11 Jan 02:08
c932d51
Compare
Choose a tag to compare

Handling Incoming Texts

After setting up the necessary routing within your Twilio account, you may create routes to handle and respond to incoming texts.

router.post("incoming") { (req) -> Response in
    // This object will give you access to all of the properties of incoming texts
    let sms = try req.content.syncDecode(IncomingSMS.self)

    let twilio  = try req.make(Twilio.self)

    // You may respond with as many texts as you'd like
    let responseMessage = SMSResponse(
        Message(body: "Hello Friend!"),
        Message(body: "This is a second text.")
    )

    return twilio.respond(with: responseMessage, on: req)
}

Updated docs and cleaned up Mailgun refrences

09 Jan 17:55
Compare
Choose a tag to compare

Thanks to @mergesort for pointing out the Mailgun reference

Initial Release

09 Jan 07:30
a84b418
Compare
Choose a tag to compare

This one supports sending texts