Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
muhsin-k committed Mar 22, 2021
2 parents a214f9c + 8a394a9 commit 50c5c44
Show file tree
Hide file tree
Showing 63 changed files with 994 additions and 647 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENTRY_DSN=
7 changes: 1 addition & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,8 @@ And install dependencies

Create a new project in [Sentry](https://sentry.io/for/react-native/)

Create file sentry under `sentry.js` in root of the project.

Add the following contents.

```
export const SENTRY_TOKEN_URL =<SENTRY_TOKEN_URL>;
```
Add `SENTRY_DSN` value in `.env` file.

If you want to supports native crashes, link the sentry SDK to your native projects.
Run the command
Expand Down
10 changes: 5 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2020 ThoughtWoot Inc.
Copyright (c) 2017-2021 Chatwoot Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ If you want to self deploy the Chatwoot mobile app, please take a look at the [C

If there's anything you'd like to chat about, please feel free to join our [Discord](https://discord.gg/cJXdrwS) chat!

_Chatwoot_ &copy; 2017-2020, ThoughtWoot Inc - Released under the MIT License.
_Chatwoot_ &copy; 2017-2020, Chatwoot Inc - Released under the MIT License.
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ android {
applicationId "com.chatwoot.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 111
versionName "1.0.11"
versionCode 113
versionName "1.0.13"
multiDexEnabled true
}
splits {
Expand Down Expand Up @@ -235,3 +235,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
27 changes: 27 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
root: ['.'],
extensions: [
'.ios.ts',
'.android.ts',
'.ts',
'.ios.tsx',
'.android.tsx',
'.tsx',
'.jsx',
'.js',
'.json',
],
alias: {
components: './src/components',
actions: './src/actions',
constants: './src/constants',
helpers: './src/helpers',
i18n: './src/i18n',
reducer: './src/reducer',
},
},
],
],
};
7 changes: 2 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { AppRegistry } from 'react-native';
import * as Sentry from '@sentry/react-native';

import Config from 'react-native-config';
import { name as appName } from './app.json';

import { SENTRY_TOKEN_URL } from './sentry';

import App from './src/app';

AppRegistry.registerComponent(appName, () => App);

Sentry.init({
dsn: SENTRY_TOKEN_URL,
dsn: Config.SENTRY_DSN,
});
8 changes: 4 additions & 4 deletions ios/Chatwoot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chatwoot/Chatwoot.entitlements;
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 113;
DEVELOPMENT_TEAM = 6C953F3RX2;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Chatwoot/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.12;
MARKETING_VERSION = 1.0.13;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -751,12 +751,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chatwoot/Chatwoot.entitlements;
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 113;
DEVELOPMENT_TEAM = 6C953F3RX2;
INFOPLIST_FILE = Chatwoot/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.12;
MARKETING_VERSION = 1.0.13;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
16 changes: 15 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ PODS:
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsinspector (0.63.3)
- react-native-config (1.4.2):
- react-native-config/App (= 1.4.2)
- react-native-config/App (1.4.2):
- React-Core
- react-native-document-picker (5.0.0):
- React-Core
- react-native-image-picker (3.1.4):
- React-Core
- react-native-netinfo (5.9.10):
Expand Down Expand Up @@ -443,6 +449,8 @@ DEPENDENCIES:
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-safari-view (from `../node_modules/react-native-safari-view`)
Expand Down Expand Up @@ -534,6 +542,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
React-jsinspector:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-document-picker:
:path: "../node_modules/react-native-document-picker"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
Expand Down Expand Up @@ -634,6 +646,8 @@ SPEC CHECKSUMS:
React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d
React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451
React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2
react-native-config: c98128a72bc2c3a1ca72caec0b021f0fa944aa29
react-native-document-picker: ca0c8769c3848866970dc9164e809c6ea45cb5d6
react-native-image-picker: 28d8d1f5a643119876b8b2c7d4d1dcfb2b232dd4
react-native-netinfo: 30fb89fa913c342be82a887b56e96be6d71201dd
react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd
Expand Down Expand Up @@ -669,4 +683,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 359eeed31941826235cdc4a3c6b998cb2e176764

COCOAPODS: 1.10.0
COCOAPODS: 1.10.1
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chatwoot/mobile-app",
"version": "1.0.12",
"version": "1.0.13",
"private": true,
"scripts": {
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
Expand Down Expand Up @@ -42,7 +42,9 @@
"react-native-actions-sheet": "^0.4.2",
"react-native-animatable": "^1.3.3",
"react-native-background-color": "^0.0.8",
"react-native-config": "^1.4.2",
"react-native-device-info": "^5.6.5",
"react-native-document-picker": "^5.0.0",
"react-native-exception-handler": "^2.10.9",
"react-native-gesture-handler": "^1.9.0",
"react-native-hyperlink": "^0.0.19",
Expand All @@ -63,14 +65,16 @@
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"tcomb-form-native": "^0.6.20",
"validator": "^13.5.2"
"validator": "^13.5.2",
"yarn": "^1.22.10"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@bam.tech/react-native-make": "^3.0.0",
"@react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"detox": "^17.4.6",
"eslint": "^6.5.1",
"eslint-plugin-detox": "^1.0.0",
Expand Down
14 changes: 14 additions & 0 deletions src/actions/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,17 @@ export const assignConversation = ({ conversationId, assigneeId }) => async (
dispatch({ type: ASSIGN_CONVERSATION_ERROR });
}
};
export const unAssignConversation = ({ conversationId, assigneeId }) => async (
dispatch,
getState,
) => {
dispatch({ type: ASSIGN_CONVERSATION });
try {
const apiUrl = `conversations/${conversationId}/assignments?assignee_id=${assigneeId}`;
await axios.post(apiUrl);
dispatch({ type: ASSIGN_CONVERSATION_SUCCESS });
dispatch(getConversationDetails({ conversationId }));
} catch (error) {
dispatch({ type: ASSIGN_CONVERSATION_ERROR });
}
};
3 changes: 1 addition & 2 deletions src/components/ConversationActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ const ConversationActionItem = ({
eva: { style, theme },
}) => {
const isActive = availabilityStatus === 'online' ? true : false;

return (
<React.Fragment>
<TouchableOpacity style={style.section} onPress={() => onPressItem({ itemType })}>
<View style={style.sectionTitleView}>
<CustomText style={style.sectionText}>{text}</CustomText>
</View>
<View style={style.sectionActionView}>
{itemType === 'assignee' && (
{itemType === 'assignee' && thumbnail !== '' && (
<UserAvatar
thumbnail={thumbnail}
userName={name}
Expand Down
4 changes: 3 additions & 1 deletion src/components/ConversationContentItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const propTypes = {

const ConversationContentItemComponent = ({ eva, unReadCount, content, messageType }) => {
const { style, theme } = eva;
const message = content.replace(/\[(@[\w_.]+)\]\(mention:\/\/user\/\d+\/[\w_.]+\)/gi, '$1');
const message = content
? content.replace(/\[(@[\w_.]+)\]\(mention:\/\/user\/\d+\/[\w_.]+\)/gi, '$1')
: '';
return (
<Fragment>
{messageType === MESSAGE_TYPES.OUTGOING ? (
Expand Down
2 changes: 1 addition & 1 deletion src/components/ConversationItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const ConversationItemComponent = ({
</View>

{!typingUser ? (
attachments && attachments.length ? (
!content && attachments && attachments.length ? (
<ConversationAttachmentItem
style={style}
theme={theme}
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"NO_ACCOUNT": "Don't have an account?",
"CREATE_ACCOUNT": "Create new account",
"SETTINGS": "Settings",
"CHANGE_LANGUAGE": "Change language",
"TERMS": "Terms & Conditions",
"CHANGE_URL": "Change URL"
},
Expand Down Expand Up @@ -59,7 +60,10 @@
"RESOLVE": "Resolve conversation",
"RE_OPEN": "Reopen conversation",
"ASSIGN": "Assign conversation",
"CANCEL": "Cancel"
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "Cancel",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents",
"UN_ASSIGN": "Unassign conversation"
},
"FILTER": {
"HEADER_TITLE": "Conversation Filter",
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"NO_ACCOUNT": "ليس لديك حساب؟",
"CREATE_ACCOUNT": "إنشاء حساب جديد",
"SETTINGS": "الإعدادات",
"CHANGE_LANGUAGE": "تغيير اللغة",
"TERMS": "الشروط والأحكام",
"CHANGE_URL": "تغيير عنوان URL"
},
Expand Down Expand Up @@ -59,7 +60,10 @@
"RESOLVE": "حل المحادثة",
"RE_OPEN": "إعادة فتح المحادثة",
"ASSIGN": "Assign conversation",
"CANCEL": "إلغاء"
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "إلغاء",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents",
"UN_ASSIGN": "Unassign conversation"
},
"FILTER": {
"HEADER_TITLE": "تصفية المحادثات",
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"NO_ACCOUNT": "No teniu compte?",
"CREATE_ACCOUNT": "Crear un nou compte",
"SETTINGS": "Configuració",
"CHANGE_LANGUAGE": "Canviar d'idioma",
"TERMS": "Termes i Condicions",
"CHANGE_URL": "Canviar URL"
},
Expand Down Expand Up @@ -59,7 +60,10 @@
"RESOLVE": "Resol la conversa",
"RE_OPEN": "Torna a obrir la conversa",
"ASSIGN": "Assign conversation",
"CANCEL": "Cancel·lar"
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "Cancel·lar",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents",
"UN_ASSIGN": "Unassign conversation"
},
"FILTER": {
"HEADER_TITLE": "Filtre de converses",
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"NO_ACCOUNT": "Don't have an account?",
"CREATE_ACCOUNT": "Create new account",
"SETTINGS": "Settings",
"CHANGE_LANGUAGE": "Change language",
"TERMS": "Terms & Conditions",
"CHANGE_URL": "Change URL"
},
Expand Down Expand Up @@ -59,7 +60,10 @@
"RESOLVE": "Resolve conversation",
"RE_OPEN": "Reopen conversation",
"ASSIGN": "Assign conversation",
"CANCEL": "Cancel"
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "Cancel",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents",
"UN_ASSIGN": "Unassign conversation"
},
"FILTER": {
"HEADER_TITLE": "Conversation Filter",
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"NO_ACCOUNT": "Don't have an account?",
"CREATE_ACCOUNT": "Create new account",
"SETTINGS": "Settings",
"CHANGE_LANGUAGE": "Change language",
"TERMS": "Terms & Conditions",
"CHANGE_URL": "Change URL"
},
Expand Down Expand Up @@ -59,7 +60,10 @@
"RESOLVE": "Resolve conversation",
"RE_OPEN": "Reopen conversation",
"ASSIGN": "Assign conversation",
"CANCEL": "Cancel"
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "Cancel",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents",
"UN_ASSIGN": "Unassign conversation"
},
"FILTER": {
"HEADER_TITLE": "Conversation Filter",
Expand Down
Loading

0 comments on commit 50c5c44

Please sign in to comment.