Compare commits

...

5 Commits

Author SHA1 Message Date
Elias Nahum
283d86c35a Bump app build number to 320 (#4740) 2020-08-27 12:47:12 -04:00
Elias Nahum
e799a4f363 Bump app version number to 1.34.1 (#4739) 2020-08-27 12:44:14 -04:00
Mattermost Build
6a35352d10 Fix soft crash for edge emoji formatting (#4705) (#4738)
(cherry picked from commit ea4e21de93)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-27 12:44:02 -04:00
Mattermost Build
6d7b594e5f SSO: Rebuild the server url without query string and/or hash (#4731) (#4736)
(cherry picked from commit 7a0b5f982e)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-27 12:43:52 -04:00
Mattermost Build
c3ce1c1f0d Use substring over replaceFirst (#4707) (#4737)
(cherry picked from commit 68457c5e7e)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-27 12:43:42 -04:00
12 changed files with 38 additions and 18 deletions

View File

@@ -133,8 +133,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60"
versionCode 318
versionName "1.34.0"
versionCode 320
versionName "1.34.1"
multiDexEnabled = true
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

View File

@@ -532,7 +532,12 @@ public class CustomPushNotification extends PushNotification {
}
private String removeSenderNameFromMessage(String message, String senderName) {
return message.replaceFirst(senderName, "").replaceFirst(": ", "").trim();
Integer index = message.indexOf(senderName);
if (index == 0) {
message = message.substring(senderName.length());
}
return message.replaceFirst(": ", "").trim();
}
private void notificationReceiptDelivery(String ackId, String postId, String type, boolean isIdLoaded, ResolvePromise promise) {

View File

@@ -38,6 +38,7 @@ export default class MarkdownEmoji extends PureComponent {
editedIndicator: this.renderEditedIndicator,
emoji: this.renderEmoji,
paragraph: this.renderParagraph,
document: this.renderParagraph,
text: this.renderText,
},
});
@@ -66,7 +67,7 @@ export default class MarkdownEmoji extends PureComponent {
renderParagraph = ({children}) => {
const style = getStyleSheet(this.props.theme);
return (
<View style={style.block}>{children}</View>
<View style={style.block}><Text>{children}</Text></View>
);
};

View File

@@ -114,10 +114,11 @@ class SSO extends PureComponent {
// Check whether we need to set a sub-path
parsedUrl.set('pathname', original.pathname || '');
parsedUrl.set('query', '');
Client4.setUrl(parsedUrl.href);
// Rebuild the server url without query string and/or hash
const url = `${parsedUrl.origin}${parsedUrl.pathname}`;
Client4.setUrl(url);
CookieManager.get(parsedUrl.href, true).then((res) => {
CookieManager.get(url, true).then((res) => {
const mmtoken = res.MMAUTHTOKEN;
const csrf = res.MMCSRF;
const token = typeof mmtoken === 'object' ? mmtoken.value : mmtoken;

View File

@@ -55,7 +55,7 @@ export function hasEmojisOnly(message, customEmojis) {
return {isEmojiOnly: false, shouldRenderJumboEmoji: false};
}
const chunks = message.trim().split(' ').filter((m) => m && m.length > 0);
const chunks = message.trim().replace(/\n/g, ' ').split(' ').filter((m) => m && m.length > 0);
if (chunks.length === 0) {
return {isEmojiOnly: false, shouldRenderJumboEmoji: false};

View File

@@ -64,6 +64,19 @@ describe('hasEmojisOnly with named emojis', () => {
name: 'This should render a codeblock instead',
message: ' :D',
expected: {isEmojiOnly: false, shouldRenderJumboEmoji: false},
}, {
name: 'Mixed emojis with whitespace and newlines',
message: `:fire:
:-)`,
expected: {isEmojiOnly: true, shouldRenderJumboEmoji: true},
}, {
name: 'Emojis with whitespace and newlines',
message: ':fire: \n:smile:',
expected: {isEmojiOnly: true, shouldRenderJumboEmoji: true},
}, {
name: 'Emojis with newlines',
message: ':fire:\n:smile:',
expected: {isEmojiOnly: true, shouldRenderJumboEmoji: true},
}];
const customEmojis = new Map([['valid_custom', 0]]);

View File

@@ -936,7 +936,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 318;
CURRENT_PROJECT_VERSION = 320;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -978,7 +978,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 318;
CURRENT_PROJECT_VERSION = 320;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View File

@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.34.0</string>
<string>1.34.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>318</string>
<string>320</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.34.0</string>
<string>1.34.1</string>
<key>CFBundleVersion</key>
<string>318</string>
<string>320</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.34.0</string>
<string>1.34.1</string>
<key>CFBundleVersion</key>
<string>318</string>
<string>320</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "mattermost-mobile",
"version": "1.34.0",
"version": "1.34.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "mattermost-mobile",
"version": "1.34.0",
"version": "1.34.1",
"description": "Mattermost Mobile with React Native",
"repository": "git@github.com:mattermost/mattermost-mobile.git",
"author": "Mattermost, Inc.",