diff --git a/BeamAPI.podspec b/BeamAPI.podspec index bd9bbf8..6545ba9 100644 --- a/BeamAPI.podspec +++ b/BeamAPI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BeamAPI" - s.version = "1.1" + s.version = "1.1.1" s.summary = "An interface to communicate with Beam's backend." s.homepage = "https://github.com/WatchBeam/beam-client-swift" s.license = "MIT" @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.ios.deployment_target = "8.2" s.tvos.deployment_target = "9.0" - s.source = { :git => "https://github.com/WatchBeam/beam-client-swift.git", :tag => "1.1" } + s.source = { :git => "https://github.com/WatchBeam/beam-client-swift.git", :tag => "1.1.1" } s.source_files = "Pod/Classes/**/*" s.dependency "Starscream", "~> 1.1" diff --git a/Pod/Classes/Models/Chat/ChatMessagePacket.swift b/Pod/Classes/Models/Chat/ChatMessagePacket.swift index 6de42cb..d3020ec 100644 --- a/Pod/Classes/Models/Chat/ChatMessagePacket.swift +++ b/Pod/Classes/Models/Chat/ChatMessagePacket.swift @@ -29,6 +29,12 @@ public class ChatMessagePacket: ChatPacket, ChatSendable { super.init(data: ["data": data]) } + /// Initializes a chat message packet with a message string. + public init(message: String) { + messageText = message.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") + super.init() + } + public var identifier: String { return "msg" }