Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Commit 4926a3b

Browse files
authored
Merge pull request #2532 from RocketChat/develop
[RELEASE] Merge DEVELOP into BETA
2 parents ea09018 + 6a61d97 commit 4926a3b

219 files changed

Lines changed: 10138 additions & 2403 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Podfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,26 @@ end
7777
post_install do |installer|
7878
swift3Targets = ['MobilePlayer', 'RCMarkdownParser']
7979
swift42Targets = ['SwipeCellKit']
80+
8081
installer.pods_project.targets.each do |target|
8182
target.build_configurations.each do |config|
8283
config.build_settings['SWIFT_VERSION'] = '4.1'
84+
config.build_settings['ENABLE_BITCODE'] = 'NO'
85+
config.build_settings['ARCHS'] = 'arm64'
86+
8387
if config.name == 'Debug'
8488
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
8589
else
8690
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule'
8791
end
8892
end
93+
8994
if swift3Targets.include? target.name
9095
target.build_configurations.each do |config|
9196
config.build_settings['SWIFT_VERSION'] = '3.1'
9297
end
9398
end
99+
94100
if swift42Targets.include? target.name
95101
target.build_configurations.each do |config|
96102
config.build_settings['SWIFT_VERSION'] = '4.2'

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ CHECKOUT OPTIONS:
157157
:commit: c34d9ccef689c55b9eae69f3c65283da8d8b0c6c
158158
:git: https://github.com/RocketChat/RCMarkdownParser.git
159159
RocketChatViewController:
160-
:commit: 918d9d91fb856b836795e673b112dc2624f2be06
160+
:commit: a887982ea898a9ee0620751923988bb77779dd38
161161
:git: https://github.com/RocketChat/RocketChatViewController
162162
SimpleImageViewer:
163163
:commit: 8222c338de0f285ca0c2d556c5d8dedd4a365b52
@@ -194,6 +194,6 @@ SPEC CHECKSUMS:
194194
SwiftyJSON: c4bcba26dd9ec7a027fc8eade48e2c911f229e96
195195
SwipeCellKit: d8f2617538ce3021cb0a11d1b93856a06a2f2e20
196196

197-
PODFILE CHECKSUM: 5d62982fe6d8cd234f28edafc23b27595439d854
197+
PODFILE CHECKSUM: 250e7f21d8e197ec35fe8d665ee0d11e46dd9082
198198

199199
COCOAPODS: 1.5.3

Pods/Manifest.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 1633 additions & 1553 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pods/RocketChatViewController/RocketChatViewController/Classes/RocketChatViewController.swift

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rocket.Chat.ShareExtension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>3.2.0</string>
20+
<string>3.3.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>223</string>
22+
<string>234</string>
2323
<key>ITSEncryptionExportComplianceCode</key>
2424
<string></string>
2525
<key>NSExtension</key>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
Localizable.strings
3+
Rocket.Chat
4+
5+
Created by Matheus Cardoso on 2/28/18.
6+
Copyright © 2018 Rocket.Chat. All rights reserved.
7+
*/
8+
9+
"global.ok" = "Ok";
10+
11+
"alert.no_servers.title" = "No servers";
12+
"alert.no_servers.message" = "You need to join at least one Rocket.Chat server in order to share something.";
13+
14+
"servers.title" = "Servers";
15+
16+
"rooms.title" = "Select Rooms";
17+
"rooms.section.server" = "Select server";
18+
"rooms.section.favorites" = "Favorites";
19+
"rooms.section.channels" = "Channels";
20+
"rooms.section.groups" = "Private Groups";
21+
"rooms.section.directMessages" = "Direct Messages";
22+
23+
"compose.title" = "Share";
24+
"compose.send" = "Send";
25+
"compose.cancel" = "Cancel";
26+
"compose.destination.to" = "To: ";
27+
"compose.file.name.placeholder" = "File name";
28+
"compose.file.description.placeholder" = "File description";
29+
30+
"report.success.title" = "Success";
31+
"report.success.message" = "Shared your content successfully.";
32+
"report.error.title" = "Error";
33+
"report.error.message" = "Something wrong happened while sending your content.";
34+
"report.cancelled.message" = "You cancelled the request. The message wasn't sent.";

Rocket.Chat.xcodeproj/project.pbxproj

Lines changed: 183 additions & 2 deletions
Large diffs are not rendered by default.

Rocket.Chat.xcodeproj/xcshareddata/xcschemes/Rocket.Chat.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1010"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Rocket.Chat/API/Clients/MessagesClient.swift

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,25 @@ struct MessagesClient: APIClient {
7373
let request = SendMessageRequest(
7474
id: id,
7575
roomId: subscription.rid,
76-
text: message.text
76+
text: message.text,
77+
messageType: message.internalType.isEmpty ? nil : message.internalType
7778
)
7879

7980
api.fetch(request) { response in
8081
switch response {
8182
case .resource(let resource):
8283
guard let message = resource.raw?["message"] else { return }
8384
updateMessage(json: message)
84-
case .error(let error):
85-
switch error {
86-
case .version:
87-
SubscriptionManager.sendTextMessage(message, completion: { response in
88-
DispatchQueue.main.async {
89-
updateMessage(json: response.result["result"])
90-
}
91-
})
92-
default:
93-
setMessageOffline()
94-
}
85+
case .error:
86+
setMessageOffline()
9587
}
9688

9789
}
9890
}
9991

100-
func sendMessage(text: String, subscription: UnmanagedSubscription, id: String = String.random(18), user: User? = AuthManager.currentUser(), realm: Realm? = Realm.current) {
92+
func sendMessage(text: String, internalType: String? = nil, subscription: UnmanagedSubscription, id: String = String.random(18), user: User? = AuthManager.currentUser(), realm: Realm? = Realm.current) {
10193
let message = Message()
102-
message.internalType = ""
94+
message.internalType = internalType ?? ""
10395
message.updatedAt = nil
10496
message.createdAt = Date.serverDate
10597
message.text = text
@@ -230,7 +222,6 @@ struct MessagesClient: APIClient {
230222
return true
231223
}
232224

233-
// swiftlint:disable function_body_length
234225
@discardableResult
235226
func reactMessage(_ message: Message, emoji: String, user: User? = AuthManager.currentUser(), realm: Realm? = Realm.current) -> Bool {
236227
guard let id = message.identifier, let username = user?.username else {
@@ -281,22 +272,8 @@ struct MessagesClient: APIClient {
281272
subscriptionType: message.subscription?.type.rawValue ?? ""
282273
)
283274
)
284-
case .error(let error):
285-
switch error {
286-
case .version:
287-
// version fallback
288-
MessageManager.react(message, emoji: emoji, completion: { _ in
289-
DispatchQueue.main.async {
290-
AnalyticsManager.log(
291-
event: .reaction(
292-
subscriptionType: message.subscription?.type.rawValue ?? ""
293-
)
294-
)
295-
}
296-
})
297-
default:
298-
Alert.defaultError.present()
299-
}
275+
case .error:
276+
Alert.defaultError.present()
300277
}
301278
}
302279

0 commit comments

Comments
 (0)