Skip to content

Commit

Permalink
Added 'rawMessage' property for LiveChatMessage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jercik committed Aug 2, 2017
1 parent 66eac67 commit 0facbae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Sources/LiveChatMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ public class LiveChatMessage : NSObject {
public let text: String
public let date: Date
public let authorName: String
public let rawMessage: NSDictionary

init(id: String, text: String, date: Date, authorName: String) {
init(id: String, text: String, date: Date, authorName: String, rawMessage: NSDictionary) {
self.id = id
self.text = text
self.date = date
self.authorName = authorName
self.rawMessage = rawMessage

super.init()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WebViewBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class WebViewBridge {
}
let authorName = authorNameObj as! String

let liveChatMessage = LiveChatMessage(id: messageId, text: text, date: Date(timeIntervalSince1970: timestamp), authorName: authorName)
let liveChatMessage = LiveChatMessage(id: messageId, text: text, date: Date(timeIntervalSince1970: timestamp), authorName: authorName, rawMessage: message)

delegate?.received(message: liveChatMessage)
} else if messageType == "hideChatWindow" {
Expand Down

0 comments on commit 0facbae

Please sign in to comment.