Skip to content

Commit

Permalink
Version 3.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webim committed Jul 31, 2019
1 parent b71809f commit 2d845fc
Show file tree
Hide file tree
Showing 23 changed files with 780 additions and 95 deletions.
94 changes: 94 additions & 0 deletions Documentation/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
- [send(file:filename:mimeType:completionHandler:) method](#send-file-filename-mime-type-completion-handler)
- [sendKeyboardRequest(button:message:completionHandler:) method](#send-keyboard-request)
- [udpateWidgetStatus(data:) method](#update-widget-status)
- [reply(message:repliedMessage:) method](#reply-message)
- [edit(message:text:completionHandler:) method](#edit-message)
- [delete(message:completionHandler:) method](#delete-message)
- [setChatRead() method](#set-chat-read)
Expand Down Expand Up @@ -199,9 +200,11 @@
- [getAttachment() method](#get-attachment)
- [getData() method](#get-data)
- [getID() method](#get-id)
- [getCurrentChatID() method](#get-current-chat-id)
- [getKeyboard() method](#get-keyboard)
- [getKeyboardRequest()](#get-keyboard-request)
- [getOperatorID() method](#get-operator-id)
- [getQuote() method](#get-quote)
- [getSenderAvatarFullURL() method](#get-sender-avatar-full-url)
- [getSenderName() method](#get-sender-name)
- [getSendStatus() method](#get-send-status)
Expand All @@ -211,6 +214,20 @@
- [isEqual(to:) method](#is-equal-to-message)
- [isReadByOperator() method](#is-read-by-operator)
- [canBeEdited() method](#can-be-edited)
- [canBeReplied() method](#can-be-replied)
- [Quote protocol](#quote)
- [getAuthorID method](#get-quote-author-id)
- [getMessageAttachment() method](#get-quote-message-attachment)
- [getMessageTimestamp() method](#get-quote-message-timestamp)
- [getMessageID() method](#get-quote-message-id)
- [getMessageText() method](#get-quote-message-text)
- [getMessageType() method](#get-quote-message-type)
- [getSenderName() method](#get-quote-sender-name)
- [getState() method](#get-quote-state)
- [QuotState enum](#quote-state)
- [PENDING case](#quote-pending)
- [FILLED case](#quote-filled)
- [NOT_FOUND case](#qoute-not-found)
- [MessageAttachment protocol](#message-attachment)
- [getContentType() method](#get-content-type)
- [getFileName() method](#get-file-name)
Expand Down Expand Up @@ -736,6 +753,15 @@ Update widget status. The change is displayed by the operator..
`data` parameter – JSON string with new widget status.
Can throw errors of [AccessError](#access-error) type.

<h3 id="reply-message">reply(message:repliedMessage:) method</h3>

Reply a message.
When calling this method, if there is an active [MessageTracker](#message-tracker) object. [added(message newMessage:,after previousMessage:) method](#added-message-new-message-after-previous-message)) with a message [SENDING case](#sending) in the status is also called.
`message` parameter – text of the message of `String` type.
`replied message` – replied message of [`Message`](#message) type.
Returns randomly generated `String`-typed ID of the message or `nil` if message can't be replied.
Can throw errors of [AccessError](#access-error) type.

<h3 id ="edit-message">edit(message:text:completionHandler:) method</h3>

Edits a text message.
Expand Down Expand Up @@ -1398,6 +1424,10 @@ Returns dictionary which contains custom fields or `nil` if there's no such cust
Every message can be uniquefied by its ID. Messages also can be lined up by its IDs. ID doesn’t change while changing the content of a message.
Returns unique ID of the message of type `String`.

<h3 id="get-current-chat-id">getCurrentChatID() method</h3>

Returns unique current chat id of the message of type `String` or `nil`.

<h3 id="get-keyboard">getKeyboard() method</h3>

Messages of type [Keyboard](#keyboard-type) contain keyboard from script robot.
Expand All @@ -1412,6 +1442,10 @@ Returns [KeyboardRequest](#keyboard-request) which contains keyboard request or

Returns ID of a message sender, if the sender is an operator, of type `String`.

<h3 id="get-quote">getQuote() method</h3>

Returns quote message of type [`Quote`](#quote) or `nil`.

<h3 id ="get-sender-avatar-full-url">getSenderAvatarFullURL() method</h3>

Returns `URL` of a sender's avatar or `nil` if one does not exist.
Expand Down Expand Up @@ -1457,6 +1491,66 @@ Returns true if visitor message read by operator or this message is not by visit

Returns true if message can be edited and false otherwise.

<h3 id="can-be-replied">canBeReplied() method</h3>

Returns true if message can be replied and false otherwise.

[Go to table of contents](#table-of-contents)

<h2 id="qoute">Quote protocol</h2>

Contains information about quote.

<h3 id ="get-quote-author-id">getAuthorID() method</h3>

Returns unique ID of message author of `String` type or `nil`.

<h3 id ="get-quote-message-attachment">getMessageAttachment() method</h3>

Returns message attachment of [`MessageAttachment`](#message-attachment) type or `nil`.

<h3 id ="get-quote-message-timestamp">getMessageTimestamp() method</h3>

Returns quote message timestamp of `Date` type or `nil`.

<h3 id ="get-quote-message-id">getMessageID() method</h3>

Returns quote message unique ID of `String` type or `nil`.

<h3 id ="get-quote-message-text">getMessageText() method</h3>

Returns quote message text of `String` type or `nil`.

<h3 id ="get-quote-message-type">getMessageType() method</h3>

Returns quote message type of [`MessageType`](#message-type) type or `nil`.

<h3 id ="get-quote-sender-name">getSenderName() method</h3>

Returns quote message sender name of `String` type or `nil`.

<h3 id ="get-quote-state>getState() method</h3>

Returns quote type of [`QuoteState`](#quote-State) type.

[Go to table of contents](#table-of-contents)

<h2 id ="quote-state">QuoteState enum</h2>

Quote state representation.

<h3 id ="quote-pending">PENDING case</h3>

Quote is loading.

<h3 id ="quote-filled">FILLED case</h3>

Quote loaded.

<h3 id ="quote-not-found">NOT_FOUND case</h3>

Quote message is not found on server.

[Go to table of contents](#table-of-contents)

<h2 id ="message-attachment">MessageAttachment protocol</h2>
Expand Down
3 changes: 1 addition & 2 deletions Example/WebimClientLibrary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,9 @@
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "WebimClientLibrary" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
"ru-RU",
Expand Down
16 changes: 1 addition & 15 deletions Example/WebimClientLibrary/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
print(userInfo)

// WEBIM: Remote notification handling.
if Webim.isWebim(remoteNotification: userInfo) == true {
if Webim.isWebim(remoteNotification: userInfo) {
_ = Webim.parse(remoteNotification: userInfo)
// Handle Webim remote notification.
} else {
// Handle another type of remote notification.
}
}

func setStatusBarColor() {
switch ColorScheme.shared.schemeType {
case .light:
UIApplication.shared.statusBarStyle = .default

break
case .dark:
UIApplication.shared.statusBarStyle = .lightContent

break
}
}

}
22 changes: 10 additions & 12 deletions Example/WebimClientLibrary/Base.lproj/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -18,20 +16,20 @@
<rect key="frame" x="0.0" y="0.0" width="618" height="671"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="© 2018 Webim.ru Inc. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="153.00000000000003" y="608.66666666666663" width="313.66666666666674" height="21"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="© 2019 Webim.ru Inc. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="152" y="608" width="314" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="highlightedColor" cocoaTouchSystemColor="darkTextColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoWebim" translatesAutoresizingMaskIntoConstraints="NO" id="nIm-cS-HcS">
<rect key="frame" x="154.66666666666663" y="265.33333333333331" width="309" height="150.66666666666669"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoWebimNavigationBar_dark" translatesAutoresizingMaskIntoConstraints="NO" id="nIm-cS-HcS">
<rect key="frame" x="154.66666666666663" y="265" width="309" height="151"/>
<constraints>
<constraint firstAttribute="width" secondItem="nIm-cS-HcS" secondAttribute="height" multiplier="1024:500" id="7S1-3j-zlS"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.89773446320000005" green="0.92855554819999997" blue="0.96161824460000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.15359008312225342" green="0.16247490048408508" blue="0.31614604592323303" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="nIm-cS-HcS" firstAttribute="centerX" secondItem="7Fn-MD-z0f" secondAttribute="centerX" id="GDd-Rl-CGX"/>
<constraint firstItem="7Fn-MD-z0f" firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="8" id="JZ9-PS-WCZ"/>
Expand All @@ -48,6 +46,6 @@
</view>
</objects>
<resources>
<image name="LogoWebim" width="1024" height="500"/>
<image name="LogoWebimNavigationBar_dark" width="1024" height="500"/>
</resources>
</document>
Loading

0 comments on commit 2d845fc

Please sign in to comment.