2017-08-04 00:34:37 +00:00
|
|
|
import React from 'react';
|
2021-10-01 18:12:19 +00:00
|
|
|
import { InteractionManager, Text, View } from 'react-native';
|
2019-01-31 16:08:38 +00:00
|
|
|
import { connect } from 'react-redux';
|
2021-06-15 20:13:42 +00:00
|
|
|
import parse from 'url-parse';
|
2019-03-27 20:06:57 +00:00
|
|
|
import moment from 'moment';
|
2019-06-28 17:07:17 +00:00
|
|
|
import * as Haptics from 'expo-haptics';
|
2019-09-16 20:26:32 +00:00
|
|
|
import { Q } from '@nozbe/watermelondb';
|
2021-03-15 20:16:34 +00:00
|
|
|
import { dequal } from 'dequal';
|
2022-03-29 18:53:27 +00:00
|
|
|
import { EdgeInsets, withSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
|
import { Subscription } from 'rxjs';
|
2017-08-13 01:35:09 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
import { IReduxEmoji } from '../../definitions/IEmoji';
|
2019-12-04 16:39:53 +00:00
|
|
|
import Touch from '../../utils/touch';
|
2022-03-29 18:53:27 +00:00
|
|
|
import { replyBroadcast } from '../../actions/messages';
|
2019-09-16 20:26:32 +00:00
|
|
|
import database from '../../lib/database';
|
2017-12-08 19:13:21 +00:00
|
|
|
import RocketChat from '../../lib/rocketchat';
|
|
|
|
import Message from '../../containers/message';
|
2022-03-29 18:53:27 +00:00
|
|
|
import MessageActions, { IMessageActions } from '../../containers/MessageActions';
|
2017-12-13 15:00:26 +00:00
|
|
|
import MessageErrorActions from '../../containers/MessageErrorActions';
|
2022-03-29 18:53:27 +00:00
|
|
|
import MessageBox, { IMessageBoxProps } from '../../containers/MessageBox';
|
2021-10-01 18:12:19 +00:00
|
|
|
import log, { events, logEvent } from '../../utils/log';
|
2019-04-17 17:01:03 +00:00
|
|
|
import EventEmitter from '../../utils/events';
|
2018-06-01 17:38:13 +00:00
|
|
|
import I18n from '../../i18n';
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
import RoomHeader from '../../containers/RoomHeader';
|
2019-03-12 16:23:06 +00:00
|
|
|
import StatusBar from '../../containers/StatusBar';
|
2019-04-08 12:35:28 +00:00
|
|
|
import debounce from '../../utils/debounce';
|
2019-05-20 20:43:50 +00:00
|
|
|
import ReactionsModal from '../../containers/ReactionsModal';
|
2019-07-23 14:02:57 +00:00
|
|
|
import { LISTENER } from '../../containers/Toast';
|
2021-10-01 18:12:19 +00:00
|
|
|
import { getBadgeColor, isBlocked, isTeamRoom, makeThreadName } from '../../utils/room';
|
2020-04-13 13:56:30 +00:00
|
|
|
import { isReadOnly } from '../../utils/isReadOnly';
|
2019-11-25 20:01:17 +00:00
|
|
|
import { isIOS, isTablet } from '../../utils/deviceInfo';
|
2019-09-18 17:32:12 +00:00
|
|
|
import { showErrorAlert } from '../../utils/info';
|
2019-12-04 16:39:53 +00:00
|
|
|
import { withTheme } from '../../theme';
|
2019-11-25 20:01:17 +00:00
|
|
|
import {
|
|
|
|
KEY_COMMAND,
|
2021-10-01 18:12:19 +00:00
|
|
|
handleCommandReplyLatest,
|
2019-11-25 20:01:17 +00:00
|
|
|
handleCommandRoomActions,
|
2021-10-01 18:12:19 +00:00
|
|
|
handleCommandScroll,
|
2022-03-29 18:53:27 +00:00
|
|
|
handleCommandSearchMessages,
|
|
|
|
IKeyCommandEvent
|
2019-11-25 20:01:17 +00:00
|
|
|
} from '../../commands';
|
2020-02-03 18:28:18 +00:00
|
|
|
import { Review } from '../../utils/review';
|
2020-02-05 13:34:53 +00:00
|
|
|
import RoomClass from '../../lib/methods/subscriptions/room';
|
2020-02-11 14:09:14 +00:00
|
|
|
import { getUserSelector } from '../../selectors/login';
|
2022-04-28 18:44:40 +00:00
|
|
|
import Navigation from '../../lib/navigation/appNavigation';
|
2020-06-15 14:00:46 +00:00
|
|
|
import SafeAreaView from '../../containers/SafeAreaView';
|
2020-06-17 17:35:58 +00:00
|
|
|
import { withDimensions } from '../../dimensions';
|
2020-07-06 20:56:28 +00:00
|
|
|
import { getHeaderTitlePosition } from '../../containers/Header';
|
2022-04-28 18:44:40 +00:00
|
|
|
import { takeInquiry, takeResume } from '../../ee/omnichannel/lib';
|
2021-06-15 20:13:42 +00:00
|
|
|
import Loading from '../../containers/Loading';
|
2022-03-29 18:53:27 +00:00
|
|
|
import { goRoom, TGoRoomItem } from '../../utils/goRoom';
|
2021-06-15 20:13:42 +00:00
|
|
|
import getThreadName from '../../lib/methods/getThreadName';
|
|
|
|
import getRoomInfo from '../../lib/methods/getRoomInfo';
|
2022-03-29 18:53:27 +00:00
|
|
|
import { ContainerTypes } from '../../containers/UIKit/interfaces';
|
2021-10-01 18:12:19 +00:00
|
|
|
import RoomServices from './services';
|
|
|
|
import LoadMore from './LoadMore';
|
|
|
|
import Banner from './Banner';
|
|
|
|
import Separator from './Separator';
|
|
|
|
import RightButtons from './RightButtons';
|
|
|
|
import LeftButtons from './LeftButtons';
|
|
|
|
import styles from './styles';
|
2022-03-29 18:53:27 +00:00
|
|
|
import JoinCode, { IJoinCodeProps } from './JoinCode';
|
2021-10-01 18:12:19 +00:00
|
|
|
import UploadProgress from './UploadProgress';
|
|
|
|
import ReactionPicker from './ReactionPicker';
|
2022-03-29 18:53:27 +00:00
|
|
|
import List, { IListContainerProps, IListProps } from './List';
|
|
|
|
import { ChatsStackParamList } from '../../stacks/types';
|
|
|
|
import {
|
|
|
|
IApplicationState,
|
|
|
|
IAttachment,
|
|
|
|
IBaseScreen,
|
|
|
|
ILoggedUser,
|
|
|
|
IMessage,
|
2022-04-28 18:44:40 +00:00
|
|
|
IOmnichannelSource,
|
2022-03-29 18:53:27 +00:00
|
|
|
ISubscription,
|
|
|
|
IVisitor,
|
|
|
|
SubscriptionType,
|
|
|
|
TAnyMessageModel,
|
2022-04-28 18:44:40 +00:00
|
|
|
TMessageModel,
|
2022-03-29 18:53:27 +00:00
|
|
|
TSubscriptionModel,
|
|
|
|
TThreadModel
|
|
|
|
} from '../../definitions';
|
|
|
|
import { ICustomEmojis } from '../../reducers/customEmojis';
|
2022-04-28 18:44:40 +00:00
|
|
|
import { E2E_MESSAGE_TYPE, E2E_STATUS, MESSAGE_TYPE_ANY_LOAD, MessageTypeLoad, themes } from '../../lib/constants';
|
2020-08-28 19:41:08 +00:00
|
|
|
|
2019-09-16 20:26:32 +00:00
|
|
|
const stateAttrsUpdate = [
|
|
|
|
'joined',
|
|
|
|
'lastOpen',
|
|
|
|
'reactionsModalVisible',
|
|
|
|
'canAutoTranslate',
|
2020-06-15 19:35:45 +00:00
|
|
|
'selectedMessage',
|
2019-09-16 20:26:32 +00:00
|
|
|
'loading',
|
|
|
|
'editing',
|
|
|
|
'replying',
|
2020-02-20 19:44:33 +00:00
|
|
|
'reacting',
|
2020-04-13 12:51:16 +00:00
|
|
|
'readOnly',
|
2021-06-15 20:13:42 +00:00
|
|
|
'member',
|
|
|
|
'showingBlockingLoader'
|
2019-09-16 20:26:32 +00:00
|
|
|
];
|
2021-10-01 18:12:19 +00:00
|
|
|
const roomAttrsUpdate = [
|
|
|
|
'f',
|
|
|
|
'ro',
|
|
|
|
'blocked',
|
|
|
|
'blocker',
|
|
|
|
'archived',
|
|
|
|
'tunread',
|
|
|
|
'muted',
|
|
|
|
'ignored',
|
|
|
|
'jitsiTimeout',
|
|
|
|
'announcement',
|
|
|
|
'sysMes',
|
|
|
|
'topic',
|
|
|
|
'name',
|
|
|
|
'fname',
|
|
|
|
'roles',
|
|
|
|
'bannerClosed',
|
|
|
|
'visitor',
|
|
|
|
'joinCodeRequired',
|
|
|
|
'teamMain',
|
2022-04-28 18:44:40 +00:00
|
|
|
'teamId',
|
|
|
|
'onHold'
|
2022-03-29 18:53:27 +00:00
|
|
|
] as const;
|
|
|
|
|
|
|
|
interface IRoomViewProps extends IBaseScreen<ChatsStackParamList, 'RoomView'> {
|
|
|
|
user: Pick<ILoggedUser, 'id' | 'username' | 'token' | 'showMessageInMainThread'>;
|
|
|
|
appState: string;
|
|
|
|
useRealName?: boolean;
|
|
|
|
isAuthenticated: boolean;
|
|
|
|
Message_GroupingPeriod?: number;
|
|
|
|
Message_TimeFormat?: string;
|
|
|
|
Message_Read_Receipt_Enabled?: boolean;
|
|
|
|
Hide_System_Messages?: string[];
|
|
|
|
baseUrl: string;
|
|
|
|
serverVersion: string | null;
|
|
|
|
customEmojis: ICustomEmojis;
|
|
|
|
isMasterDetail: boolean;
|
|
|
|
replyBroadcast: Function;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
insets: EdgeInsets;
|
|
|
|
}
|
|
|
|
|
|
|
|
type TRoomUpdate = typeof roomAttrsUpdate[number];
|
2018-09-26 13:56:36 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
interface IRoomViewState {
|
|
|
|
[key: string]: any;
|
|
|
|
joined: boolean;
|
|
|
|
room: TSubscriptionModel | { rid: string; t: string; name?: string; fname?: string; prid?: string; joinCodeRequired?: boolean };
|
|
|
|
roomUpdate: {
|
|
|
|
[K in TRoomUpdate]?: any; // TODO: get type from TSubscriptionModel
|
2017-09-25 13:15:28 +00:00
|
|
|
};
|
2022-03-29 18:53:27 +00:00
|
|
|
member: any;
|
|
|
|
lastOpen: Date | null;
|
|
|
|
reactionsModalVisible: boolean;
|
2022-04-28 18:44:40 +00:00
|
|
|
selectedMessage?: TAnyMessageModel;
|
2022-03-29 18:53:27 +00:00
|
|
|
canAutoTranslate: boolean;
|
|
|
|
loading: boolean;
|
|
|
|
showingBlockingLoader: boolean;
|
|
|
|
editing: boolean;
|
|
|
|
replying: boolean;
|
|
|
|
replyWithMention: boolean;
|
|
|
|
reacting: boolean;
|
|
|
|
readOnly: boolean;
|
|
|
|
unreadsCount: number | null;
|
|
|
|
roomUserId?: string | null;
|
|
|
|
}
|
2017-08-05 18:16:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
|
|
|
private rid?: string;
|
|
|
|
private t?: string;
|
|
|
|
private tmid?: string;
|
|
|
|
private jumpToMessageId?: string;
|
|
|
|
private jumpToThreadId?: string;
|
|
|
|
// TODO: review these refs
|
|
|
|
private messagebox: React.RefObject<IMessageBoxProps>;
|
|
|
|
private list: React.RefObject<IListContainerProps>;
|
|
|
|
private joinCode: React.RefObject<IJoinCodeProps>;
|
|
|
|
private flatList: React.RefObject<IListProps>;
|
|
|
|
private mounted: boolean;
|
|
|
|
private sub?: any;
|
|
|
|
private offset = 0;
|
|
|
|
private didMountInteraction: any;
|
|
|
|
private subSubscription?: Subscription;
|
|
|
|
private queryUnreads?: Subscription;
|
|
|
|
private retryInit = 0;
|
|
|
|
private retryInitTimeout?: number;
|
|
|
|
private retryFindCount = 0;
|
|
|
|
private retryFindTimeout?: number;
|
|
|
|
private messageErrorActions?: React.RefObject<any>; // TODO: type me
|
|
|
|
private messageActions?: React.RefObject<IMessageActions>;
|
|
|
|
|
|
|
|
constructor(props: IRoomViewProps) {
|
2019-05-28 13:03:08 +00:00
|
|
|
super(props);
|
2021-10-01 18:12:19 +00:00
|
|
|
console.time(`${this.constructor.name} init`);
|
|
|
|
console.time(`${this.constructor.name} mount`);
|
2020-06-15 14:00:46 +00:00
|
|
|
this.rid = props.route.params?.rid;
|
|
|
|
this.t = props.route.params?.t;
|
2022-03-29 18:53:27 +00:00
|
|
|
/**
|
|
|
|
* On threads, we don't have a subscription.
|
|
|
|
* `this.state.room` is going to have only a few properties sent during navigation.
|
|
|
|
* Use `this.tmid` as thread id.
|
|
|
|
*/
|
2020-06-15 14:00:46 +00:00
|
|
|
this.tmid = props.route.params?.tmid;
|
|
|
|
const selectedMessage = props.route.params?.message;
|
|
|
|
const name = props.route.params?.name;
|
|
|
|
const fname = props.route.params?.fname;
|
|
|
|
const prid = props.route.params?.prid;
|
2020-10-30 17:35:07 +00:00
|
|
|
const room = props.route.params?.room ?? {
|
2022-03-29 18:53:27 +00:00
|
|
|
rid: this.rid as string,
|
|
|
|
t: this.t as string,
|
2021-10-01 18:12:19 +00:00
|
|
|
name,
|
|
|
|
fname,
|
|
|
|
prid
|
2020-10-30 17:35:07 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
this.jumpToMessageId = props.route.params?.jumpToMessageId;
|
2021-10-28 17:49:08 +00:00
|
|
|
this.jumpToThreadId = props.route.params?.jumpToThreadId;
|
2020-10-30 17:35:07 +00:00
|
|
|
const roomUserId = props.route.params?.roomUserId ?? RocketChat.getUidDirectMessage(room);
|
2017-08-07 18:42:02 +00:00
|
|
|
this.state = {
|
2019-09-16 20:26:32 +00:00
|
|
|
joined: true,
|
2020-10-30 17:35:07 +00:00
|
|
|
room,
|
2019-09-16 20:26:32 +00:00
|
|
|
roomUpdate: {},
|
2020-03-30 20:19:01 +00:00
|
|
|
member: {},
|
2019-05-20 20:43:50 +00:00
|
|
|
lastOpen: null,
|
|
|
|
reactionsModalVisible: false,
|
2022-03-29 18:53:27 +00:00
|
|
|
selectedMessage,
|
2019-09-16 20:26:32 +00:00
|
|
|
canAutoTranslate: false,
|
|
|
|
loading: true,
|
2021-06-15 20:13:42 +00:00
|
|
|
showingBlockingLoader: false,
|
2019-09-16 20:26:32 +00:00
|
|
|
editing: false,
|
|
|
|
replying: !!selectedMessage,
|
|
|
|
replyWithMention: false,
|
2020-02-20 19:44:33 +00:00
|
|
|
reacting: false,
|
2020-06-15 14:00:46 +00:00
|
|
|
readOnly: false,
|
|
|
|
unreadsCount: null,
|
2020-10-30 17:35:07 +00:00
|
|
|
roomUserId
|
2017-08-07 18:42:02 +00:00
|
|
|
};
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room) {
|
|
|
|
// @ts-ignore TODO: type guard isn't helping here :(
|
2019-09-16 20:26:32 +00:00
|
|
|
this.observeRoom(room);
|
2019-11-25 20:01:17 +00:00
|
|
|
} else if (this.rid) {
|
2019-09-16 20:26:32 +00:00
|
|
|
this.findAndObserveRoom(this.rid);
|
|
|
|
}
|
|
|
|
|
2020-04-13 12:51:16 +00:00
|
|
|
this.setReadOnly();
|
|
|
|
|
2019-04-08 12:35:28 +00:00
|
|
|
this.messagebox = React.createRef();
|
2019-11-07 19:53:39 +00:00
|
|
|
this.list = React.createRef();
|
2020-12-01 17:30:39 +00:00
|
|
|
this.joinCode = React.createRef();
|
2021-06-15 20:13:42 +00:00
|
|
|
this.flatList = React.createRef();
|
2019-05-03 14:54:57 +00:00
|
|
|
this.mounted = false;
|
2021-03-15 20:16:34 +00:00
|
|
|
|
|
|
|
// we don't need to subscribe to threads
|
|
|
|
if (this.rid && !this.tmid) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.sub = new RoomClass(this.rid);
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
console.timeEnd(`${this.constructor.name} init`);
|
2017-08-07 00:34:35 +00:00
|
|
|
}
|
2017-08-04 00:34:37 +00:00
|
|
|
|
2018-12-21 10:55:35 +00:00
|
|
|
componentDidMount() {
|
2019-09-16 20:26:32 +00:00
|
|
|
this.mounted = true;
|
2019-04-17 17:01:03 +00:00
|
|
|
this.didMountInteraction = InteractionManager.runAfterInteractions(() => {
|
2020-06-15 14:00:46 +00:00
|
|
|
const { isAuthenticated } = this.props;
|
|
|
|
this.setHeader();
|
2020-04-03 18:03:53 +00:00
|
|
|
if (this.rid) {
|
2021-03-15 20:16:34 +00:00
|
|
|
this.sub?.subscribe?.();
|
2020-04-03 18:03:53 +00:00
|
|
|
if (isAuthenticated) {
|
|
|
|
this.init();
|
|
|
|
} else {
|
|
|
|
EventEmitter.addEventListener('connected', this.handleConnected);
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
if (this.jumpToMessageId) {
|
|
|
|
this.jumpToMessage(this.jumpToMessageId);
|
|
|
|
}
|
2021-10-28 17:49:08 +00:00
|
|
|
if (this.jumpToThreadId && !this.jumpToMessageId) {
|
|
|
|
this.navToThread({ tmid: this.jumpToThreadId });
|
|
|
|
}
|
2019-11-25 20:01:17 +00:00
|
|
|
if (isIOS && this.rid) {
|
2019-09-16 21:19:14 +00:00
|
|
|
this.updateUnreadCount();
|
|
|
|
}
|
2019-04-08 12:35:28 +00:00
|
|
|
});
|
2019-11-25 20:01:17 +00:00
|
|
|
if (isTablet) {
|
|
|
|
EventEmitter.addEventListener(KEY_COMMAND, this.handleCommands);
|
|
|
|
}
|
2020-03-06 13:13:24 +00:00
|
|
|
EventEmitter.addEventListener('ROOM_REMOVED', this.handleRoomRemoved);
|
2021-10-01 18:12:19 +00:00
|
|
|
console.timeEnd(`${this.constructor.name} mount`);
|
2018-02-08 14:08:50 +00:00
|
|
|
}
|
2018-09-19 14:18:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
shouldComponentUpdate(nextProps: IRoomViewProps, nextState: IRoomViewState) {
|
2019-09-16 20:26:32 +00:00
|
|
|
const { state } = this;
|
2020-03-30 20:19:01 +00:00
|
|
|
const { roomUpdate, member } = state;
|
2021-10-01 18:12:19 +00:00
|
|
|
const { appState, theme, insets, route } = this.props;
|
2019-12-04 16:39:53 +00:00
|
|
|
if (theme !== nextProps.theme) {
|
|
|
|
return true;
|
|
|
|
}
|
2019-09-16 20:26:32 +00:00
|
|
|
if (appState !== nextProps.appState) {
|
2018-12-05 20:52:08 +00:00
|
|
|
return true;
|
2019-09-16 20:26:32 +00:00
|
|
|
}
|
2020-03-30 20:19:01 +00:00
|
|
|
if (member.statusText !== nextState.member.statusText) {
|
|
|
|
return true;
|
|
|
|
}
|
2019-09-16 20:26:32 +00:00
|
|
|
const stateUpdated = stateAttrsUpdate.some(key => nextState[key] !== state[key]);
|
|
|
|
if (stateUpdated) {
|
2019-02-07 15:48:10 +00:00
|
|
|
return true;
|
2018-09-26 13:56:36 +00:00
|
|
|
}
|
2021-03-15 20:16:34 +00:00
|
|
|
if (!dequal(nextProps.insets, insets)) {
|
2020-07-06 20:56:28 +00:00
|
|
|
return true;
|
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
if (!dequal(nextProps.route?.params, route?.params)) {
|
|
|
|
return true;
|
|
|
|
}
|
2021-03-15 20:16:34 +00:00
|
|
|
return roomAttrsUpdate.some(key => !dequal(nextState.roomUpdate[key], roomUpdate[key]));
|
2017-09-21 17:08:00 +00:00
|
|
|
}
|
2018-07-10 13:40:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
componentDidUpdate(prevProps: IRoomViewProps, prevState: IRoomViewState) {
|
2020-06-15 14:00:46 +00:00
|
|
|
const { roomUpdate } = this.state;
|
2021-06-15 20:13:42 +00:00
|
|
|
const { appState, insets, route } = this.props;
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if (route?.params?.jumpToMessageId && route?.params?.jumpToMessageId !== prevProps.route?.params?.jumpToMessageId) {
|
2021-06-15 20:13:42 +00:00
|
|
|
this.jumpToMessage(route?.params?.jumpToMessageId);
|
|
|
|
}
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if (route?.params?.jumpToThreadId && route?.params?.jumpToThreadId !== prevProps.route?.params?.jumpToThreadId) {
|
2021-10-28 17:49:08 +00:00
|
|
|
this.navToThread({ tmid: route?.params?.jumpToThreadId });
|
|
|
|
}
|
|
|
|
|
2019-11-25 20:01:17 +00:00
|
|
|
if (appState === 'foreground' && appState !== prevProps.appState && this.rid) {
|
2020-07-20 16:44:54 +00:00
|
|
|
// Fire List.query() just to keep observables working
|
|
|
|
if (this.list && this.list.current) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore TODO: is this working?
|
2020-07-20 16:44:54 +00:00
|
|
|
this.list.current?.query?.();
|
|
|
|
}
|
2018-07-10 13:40:32 +00:00
|
|
|
}
|
2020-03-30 20:19:01 +00:00
|
|
|
// If it's not direct message
|
|
|
|
if (this.t !== 'd') {
|
|
|
|
if (roomUpdate.topic !== prevState.roomUpdate.topic) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2020-03-30 20:19:01 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-08 17:36:10 +00:00
|
|
|
// If it's a livechat room
|
|
|
|
if (this.t === 'l') {
|
2021-03-15 20:16:34 +00:00
|
|
|
if (!dequal(prevState.roomUpdate.visitor, roomUpdate.visitor)) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2020-05-08 17:36:10 +00:00
|
|
|
}
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
if (roomUpdate.teamMain !== prevState.roomUpdate.teamMain || roomUpdate.teamId !== prevState.roomUpdate.teamId) {
|
2021-06-15 20:13:42 +00:00
|
|
|
this.setHeader();
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
if (
|
|
|
|
(roomUpdate.fname !== prevState.roomUpdate.fname ||
|
|
|
|
roomUpdate.name !== prevState.roomUpdate.name ||
|
|
|
|
roomUpdate.teamMain !== prevState.roomUpdate.teamMain ||
|
|
|
|
roomUpdate.teamId !== prevState.roomUpdate.teamId) &&
|
|
|
|
!this.tmid
|
|
|
|
) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2020-03-30 20:19:01 +00:00
|
|
|
}
|
2020-07-06 20:56:28 +00:00
|
|
|
if (insets.left !== prevProps.insets.left || insets.right !== prevProps.insets.right) {
|
|
|
|
this.setHeader();
|
|
|
|
}
|
2020-06-26 20:22:56 +00:00
|
|
|
this.setReadOnly();
|
2018-07-10 13:40:32 +00:00
|
|
|
}
|
|
|
|
|
2019-09-16 20:26:32 +00:00
|
|
|
async componentWillUnmount() {
|
|
|
|
const { editing, room } = this.state;
|
|
|
|
const db = database.active;
|
2019-05-03 14:54:57 +00:00
|
|
|
this.mounted = false;
|
2019-06-08 11:31:29 +00:00
|
|
|
if (!editing && this.messagebox && this.messagebox.current) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2019-04-08 12:35:28 +00:00
|
|
|
const { text } = this.messagebox.current;
|
2022-03-29 18:53:27 +00:00
|
|
|
let obj: TSubscriptionModel | TThreadModel | null = null;
|
2019-04-24 18:36:29 +00:00
|
|
|
if (this.tmid) {
|
2019-09-16 20:26:32 +00:00
|
|
|
try {
|
2021-03-15 20:16:34 +00:00
|
|
|
const threadsCollection = db.get('threads');
|
2019-09-16 20:26:32 +00:00
|
|
|
obj = await threadsCollection.find(this.tmid);
|
|
|
|
} catch (e) {
|
|
|
|
// Do nothing
|
|
|
|
}
|
2019-04-24 18:36:29 +00:00
|
|
|
} else {
|
2022-03-29 18:53:27 +00:00
|
|
|
obj = room as TSubscriptionModel;
|
2019-04-24 18:36:29 +00:00
|
|
|
}
|
|
|
|
if (obj) {
|
2019-09-16 20:26:32 +00:00
|
|
|
try {
|
2022-03-29 18:53:27 +00:00
|
|
|
await db.write(async () => {
|
|
|
|
// FIXME: why do I need to tell ts this is non null if we have that if condition above?
|
|
|
|
await obj!.update(r => {
|
2019-09-16 20:26:32 +00:00
|
|
|
r.draftMessage = text;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} catch (error) {
|
|
|
|
// Do nothing
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
}
|
2019-04-08 12:35:28 +00:00
|
|
|
}
|
2020-02-05 13:34:53 +00:00
|
|
|
this.unsubscribe();
|
2019-04-08 12:35:28 +00:00
|
|
|
if (this.didMountInteraction && this.didMountInteraction.cancel) {
|
|
|
|
this.didMountInteraction.cancel();
|
|
|
|
}
|
2019-09-16 20:26:32 +00:00
|
|
|
if (this.subSubscription && this.subSubscription.unsubscribe) {
|
|
|
|
this.subSubscription.unsubscribe();
|
|
|
|
}
|
|
|
|
if (this.queryUnreads && this.queryUnreads.unsubscribe) {
|
|
|
|
this.queryUnreads.unsubscribe();
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
if (this.retryInitTimeout) {
|
|
|
|
clearTimeout(this.retryInitTimeout);
|
|
|
|
}
|
|
|
|
if (this.retryFindTimeout) {
|
|
|
|
clearTimeout(this.retryFindTimeout);
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
EventEmitter.removeListener('connected', this.handleConnected);
|
2019-11-25 20:01:17 +00:00
|
|
|
if (isTablet) {
|
|
|
|
EventEmitter.removeListener(KEY_COMMAND, this.handleCommands);
|
|
|
|
}
|
2020-03-06 13:13:24 +00:00
|
|
|
EventEmitter.removeListener('ROOM_REMOVED', this.handleRoomRemoved);
|
2021-10-01 18:12:19 +00:00
|
|
|
console.countReset(`${this.constructor.name}.render calls`);
|
2017-08-04 00:34:37 +00:00
|
|
|
}
|
|
|
|
|
2020-07-31 18:22:30 +00:00
|
|
|
get isOmnichannel() {
|
|
|
|
const { room } = this.state;
|
|
|
|
return room.t === 'l';
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
setHeader = () => {
|
2021-10-01 18:12:19 +00:00
|
|
|
const { room, unreadsCount, roomUserId, joined } = this.state;
|
|
|
|
const { navigation, isMasterDetail, theme, baseUrl, user, insets, route } = this.props;
|
2020-10-30 17:35:07 +00:00
|
|
|
const { rid, tmid } = this;
|
2022-03-29 18:53:27 +00:00
|
|
|
if (!room.rid) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-10-30 17:35:07 +00:00
|
|
|
const prid = room?.prid;
|
2022-03-29 18:53:27 +00:00
|
|
|
const isGroupChat = RocketChat.isGroupChat(room as ISubscription);
|
2020-06-15 14:00:46 +00:00
|
|
|
let title = route.params?.name;
|
2022-03-29 18:53:27 +00:00
|
|
|
let parentTitle = '';
|
|
|
|
// TODO: I think it's safe to remove this, but we need to test tablet without rooms
|
|
|
|
if (!tmid) {
|
2020-06-15 14:00:46 +00:00
|
|
|
title = RocketChat.getRoomTitle(room);
|
|
|
|
}
|
2020-10-30 17:35:07 +00:00
|
|
|
if (tmid) {
|
|
|
|
parentTitle = RocketChat.getRoomTitle(room);
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
let subtitle: string | undefined;
|
|
|
|
let t: string;
|
|
|
|
let teamMain: boolean | undefined;
|
|
|
|
let teamId: string | undefined;
|
|
|
|
let encrypted: boolean | undefined;
|
|
|
|
let userId: string | undefined;
|
|
|
|
let token: string | undefined;
|
|
|
|
let avatar: string | undefined;
|
|
|
|
let visitor: IVisitor | undefined;
|
2022-04-28 18:44:40 +00:00
|
|
|
let sourceType: IOmnichannelSource | undefined;
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room) {
|
|
|
|
subtitle = room.topic;
|
|
|
|
t = room.t;
|
|
|
|
teamMain = room.teamMain;
|
|
|
|
teamId = room.teamId;
|
|
|
|
encrypted = room.encrypted;
|
|
|
|
({ id: userId, token } = user);
|
|
|
|
avatar = room.name;
|
|
|
|
visitor = room.visitor;
|
2020-06-15 14:00:46 +00:00
|
|
|
}
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
|
2022-04-28 18:44:40 +00:00
|
|
|
if ('source' in room) {
|
|
|
|
t = room.t;
|
|
|
|
sourceType = room.source;
|
|
|
|
visitor = room.visitor;
|
|
|
|
}
|
|
|
|
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
let numIconsRight = 2;
|
|
|
|
if (tmid) {
|
|
|
|
numIconsRight = 1;
|
2022-03-29 18:53:27 +00:00
|
|
|
} else if (teamId && isTeamRoom({ teamId, joined })) {
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
numIconsRight = 3;
|
|
|
|
}
|
|
|
|
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight });
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
navigation.setOptions({
|
|
|
|
headerShown: true,
|
|
|
|
headerTitleAlign: 'left',
|
2020-07-06 20:56:28 +00:00
|
|
|
headerTitleContainerStyle: {
|
|
|
|
left: headerTitlePosition.left,
|
|
|
|
right: headerTitlePosition.right
|
|
|
|
},
|
|
|
|
headerLeft: () => (
|
|
|
|
<LeftButtons
|
|
|
|
tmid={tmid}
|
|
|
|
unreadsCount={unreadsCount}
|
|
|
|
navigation={navigation}
|
|
|
|
baseUrl={baseUrl}
|
|
|
|
userId={userId}
|
|
|
|
token={token}
|
|
|
|
title={avatar}
|
|
|
|
theme={theme}
|
|
|
|
t={t}
|
|
|
|
goRoomActionsView={this.goRoomActionsView}
|
|
|
|
isMasterDetail={isMasterDetail}
|
|
|
|
/>
|
|
|
|
),
|
2020-06-15 14:00:46 +00:00
|
|
|
headerTitle: () => (
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
<RoomHeader
|
2020-06-15 14:00:46 +00:00
|
|
|
rid={rid}
|
|
|
|
prid={prid}
|
|
|
|
tmid={tmid}
|
|
|
|
title={title}
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
teamMain={teamMain}
|
2020-10-30 17:35:07 +00:00
|
|
|
parentTitle={parentTitle}
|
2020-06-15 14:00:46 +00:00
|
|
|
subtitle={subtitle}
|
|
|
|
type={t}
|
|
|
|
roomUserId={roomUserId}
|
|
|
|
visitor={visitor}
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
isGroupChat={isGroupChat}
|
|
|
|
onPress={this.goRoomActionsView}
|
2021-10-01 18:12:19 +00:00
|
|
|
testID={`room-view-title-${title}`}
|
2022-04-28 18:44:40 +00:00
|
|
|
sourceType={sourceType}
|
2020-06-15 14:00:46 +00:00
|
|
|
/>
|
|
|
|
),
|
|
|
|
headerRight: () => (
|
|
|
|
<RightButtons
|
|
|
|
rid={rid}
|
|
|
|
tmid={tmid}
|
Merge 4.16.0 into single-server (#3057)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c028dd47b4ce0f11eb396c8f2a4cf807.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
2021-04-13 13:39:06 +00:00
|
|
|
teamId={teamId}
|
2021-06-15 20:13:42 +00:00
|
|
|
joined={joined}
|
2022-04-28 18:44:40 +00:00
|
|
|
t={this.t || t}
|
2021-10-28 17:49:08 +00:00
|
|
|
encrypted={encrypted}
|
2020-06-15 14:00:46 +00:00
|
|
|
navigation={navigation}
|
|
|
|
toggleFollowThread={this.toggleFollowThread}
|
|
|
|
/>
|
|
|
|
)
|
2020-03-30 20:19:01 +00:00
|
|
|
});
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-11-25 20:01:17 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
goRoomActionsView = (screen?: string) => {
|
2020-08-05 13:15:56 +00:00
|
|
|
logEvent(events.ROOM_GO_RA);
|
2021-10-01 18:12:19 +00:00
|
|
|
const { room, member, joined } = this.state;
|
2020-06-15 14:00:46 +00:00
|
|
|
const { navigation, isMasterDetail } = this.props;
|
|
|
|
if (isMasterDetail) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore TODO: find a way to make it work
|
2020-06-15 14:00:46 +00:00
|
|
|
navigation.navigate('ModalStackNavigator', {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-06-15 14:00:46 +00:00
|
|
|
screen: screen ?? 'RoomActionsView',
|
|
|
|
params: {
|
2022-03-29 18:53:27 +00:00
|
|
|
rid: this.rid as string,
|
|
|
|
t: this.t as SubscriptionType,
|
|
|
|
// @ts-ignore
|
2021-10-01 18:12:19 +00:00
|
|
|
room,
|
|
|
|
member,
|
|
|
|
showCloseModal: !!screen,
|
|
|
|
joined
|
2020-06-15 14:00:46 +00:00
|
|
|
}
|
|
|
|
});
|
2022-03-29 18:53:27 +00:00
|
|
|
} else if (this.rid && this.t) {
|
Merge 4.25.0 into single-server (#3790)
* Chore: Migrate DefaultBrowserView to Typescript (#3488)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate PickerView to Typescript (#3501)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate AttachmentView to Typescript (#3483)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate MarkdownTableView to Typescript (#3500)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EEncryptionSecurityView to Typescript (#3489)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EEnterYourPasswordView to Typescript (#3490)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EHowItWorksView to Typescript (#3492)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2ESaveYourPasswordView to Typescript (#3493)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ForgotPasswordView to Typescript (#3496)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ForwardLivechatView to Typescript (#3497)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate JitsiMeetView to Typescript (#3498)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Push notifications user preference not syncing correctly (#3494)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Display prefs showing wrong header icon on tablet (#3510)
* Merge 4.22.0 into master (#3523)
* Tests: Make Detox work on Android (#3051)
* Chore: Migrate NewMessageView to Typescript (#3502)
* Chore: Migrate ScreenLockConfigView to Typescript (#3517)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ScreenLockedView to Typescript (#3515)
* Chore: Migrate SecurityPrivacyView to Typescript (#3518)
* Chore: Migrate SelectListView to Typescript (#3519)
* Chore: Migrate SelectServerView to Typescript (#3521)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate SetUsernameView to Typescript (#3526)
* Chore: Migrate ThemeView to Typescript (#3522)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate StatusView to Typescript (#3527)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate ShareListView to Typescript (#3459)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* Chore: Migrate TeamChannelsView to Typescript (#3532)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* Language update from LingoHub 🤖 (#3529)
Project Name: Rocket.Chat.ReactNative
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat-dot-reactnative
User: Robot LingoHub
Easy language translations with LingoHub 🚀
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate react-navigation to TypeScript (#3480)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Bump version to 4.23.0 (#3546)
* [FIX] Certificate stops working after app update on iOS (#3537)
* [IMPROVE] Connection stability (#3531)
* [NEW] Permission for uploading files (#3505)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Files screen stopped listing content on server 4.2 (#3541)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ModalBlockView to Typescript (#3503)
* Chore: Migrate ModalBlockView to Typescript
* minor tweaks
* update the navigator
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate SelectedUsersView to Typescript (#3520)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVE] Remove Omnichannel visitor's navigation history (#3534)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Merge 4.23.0 into master (#3574)
* [FIX] Download video/quicktime in iOS (#3581)
* Chore: Migrate Redux to Typescript PoC (#3565)
* Chore: Migrate Model's folder to Typescript (#3564)
* Chore: Migrate lib user preferences to Typescript (#3578)
* Chore: Update React Native Device Info to 8.4.8 (#3560)
* [FIX] Roles rendering on dark theme (#3589)
* fix: Add height verification to fix modal dimension (#3573)
* chore: Change the lib `@types/url-parse` to devDependencies (#3585)
* [FIX] teams.removeMembers mobile usage (#3557)
* Chore: Migrate DisplayPrefsView to Typescript (#3555)
* Chore: Migrate Utils Folder to Typescript (#3544)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate ThreadMessagesView to Typescript (#3538)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* [FIX] RoomInfoView displaying different info depending on the origin (#3586)
Co-authored-by: GleidsonDaniel <gleidson10daniel@hotmail.com>
* [FIX] Message parser switch not updating field properly (#3576)
* [FIX] Lint not ignoring Markdown props (#3600)
* Bump version to 4.24.0 (#3601)
* Chore: Migrate notification/push to Typescript (#3587)
* chore: migrate connect to ts and add tests
* chore: add more tests
* Chore: Update react-native-device-info patch-package and pods (#3605)
* [FIX] App crashes when entering server after applying certificate (Android) (#3579)
* chore: migrate redux module encryption to typescript
* chore: migrate customEmoji to typescript and add tests
* chore: create IPreferences interface
* chore: migrate redux module sortPreferences to typescript
* chore: fix IPreference interface and organize import
* chore: migrate to typescript
* chore: migrate usersTyping to typescript
* Add DiscussionDetails and Item for DiscussionsView; update ThreadDetails, BackgroundContainer and DiscussionsView
* chore: migrate settings to typescript
* chore: add interface to IStateAplication
* chore: migrate redux module room to typescript
* update definitions
* chore: fix error on error interface
* [FIX] Joining and leaving messages in teams (#3591)
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* minor tweak
* [FIX] TypeScript's errors raised by HOCs (#3535)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* chore: migrate redux module roles to typescript
* wip: add IRoles to IAplicationState interface
* add storybooks, update snapshots and DiscussionsView
* Minor tweaks
* Fix lint
* Remove unused import
* chore: migrate redux module inviteUsers to typescript
* chore: migrate messages action to typescript
* chore: fix any interface and change null to empty string
* chore: implements IAplicationState on type
* chore: remove mapDispatchToProps and continue ts migration
* chore: fix types and apply IAplicationState to types
* Migrate redux server action/reducer to ts
* add tests
* [FIX] App crashes when opening a notification while app is closed (#3629)
* [FIX] makeThreadName asserting undefined as non-null (#3628)
* [FIX] Threads' pagination not working (#3631)
* update tests
* chore: update settings value types
* Send missing params to selectServerRequest
* [IMPROVE] Convert HEIC images to JPG and remove compression (#3633)
* update interface
* update action definition
* Move onDiscussionpress logic on message, update SearchHeader and DiscussionDetails component, add useLayoutEffect at DiscussionsView
* Update interfaces and minor tweaks to DiscussionsView screen and components
* Fix navigation logic and update interfaces
* Minor tweaks
* Undo change on project.pbxproj
* Update project.pbxproj
* Update project.pbxproj
* Remove style.ts
* Minor tweak
* update snapshots
* Merge 4.24.0 into master (#3648)
* Chore: Change console.log to console.error when logging error
* chore: add as string to fix type
* Fix lint
* fix types
* test
* Remove console.log
* test
* [FIX] StoryShots not working for async rendered components (#3677)
* remove console.log
* Add missing DiscussionsView snapshot
* fix build and useless done and async generator
* update snapshot
* Chore: fix build and useless done and async generator (#3678)
* fix build and useless done and async generator
* update snapshot
* Chore: Migrate Database to Typescript (#3580)
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module permissions to typescript (#3630)
* Chore: Migrate redux module share to typescript (#3612)
* chore: migrate redux module share to typescript
* chore: fix types
* chore: update types
* chore: migrate redux module share to typescript
* remove double import
* chore: fix import
* Chore: Migrate redux module createChannel to typescript (#3602)
* chore: migrate createChannel to ts and add tests
* chore: fix naming
* chore: add more types and remove mapDispatchToProps from components
* remove todo
* update tests
* chore: migrate interface to reducer and fix errors on return
* chore: insert IApplicationState to mapStateToProps state type
* Remove spread
* fix type
* fix import and state type
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module app to typescript (#3598)
* chore: migrate activeUsers reducer and action to TS
* chore: init types folder and set redux and BaseScreen interface
* chore: remove mapDispatchToProps to use dispatch prop and clear some types
* chore: type selectedUsers action and reducer and improvement in the code of other files
* chore: move IUser to base types
* chore: move state props to ISelectedUsersViewProps
* chore: create mocketStore
* chore: remove applyAppStateMiddleware
* test: create activeUser and selectedUser tests
* test: add more selectedUsers tests
* chore: fix action type
* chore: move types to definition folder and fix imports
* chore: remove unused const
* chore: migrate redux tests to reducer folder and add eslint jest plugin
* chore: exprot initial state and then import on tests
* chore: move interfaces to reducer and import on screen
* chore: set eslint-plugin-jest version to 24.7.0
* chore: fix IUser import
* chore: update interfaces and types names
* chore: update definitions
* chore: update IBaseScreen definitions
* chore: init reducer/app migration to ts
* chore: add tests and migrate RootEnum
* wip: migrate fixed consts to RootEnum
* chore: remove redux action inferences
* fix types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module createDiscussion to typescript (#3604)
* chore: migrate createDiscussion to ts and add tests
* chore: add TActionCreateDiscussion to TApplicationActions
* fix types
* update types
* fix types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] ios-testflight-experimental unable to find cache (#3684)
* Chore: Remove Non-null assertion operator in ThreadMessagesView (#3632)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate CannedResponsesListView to Typescript (#3553)
* Chore: Migrate CannedResponsesListView to TS
* Moved IcannedResponse to definitions and fixed the index
* Chore: Migrate CannedResponseDetail to TS
* minor tweaks
* refactor: update new types and interfaces for use ISubscription
* fix lint error and canned responses's dropdown
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate LivechatEditView to Typescript (#3499)
* Chore: Migrate LivechatEditView to Typescript
* refactor: minor tweak
* refactor: fix the interfaces for input
* refactor: fix lint erros
* minor tweak with new navigation types
* function
* iroom tweak
* livechateditview tweak
* TextInput tweak
* refactor: update new types and interfaces for use ISubscription
* refactor to default useState type
* change the component name in SearchBox
* changed state type
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Regression: Message press navigating to empty RoomView (#3680)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Regression: Prevent duplicated .jpg on file upload (#3658)
* [FIX] Regression: Prevent duplicated .jpg on file upload
* refactor to all files typed as image/jpeg
* isolate regexp to function
* refactor forceJpgExtension
* clean
* minor tweak
* [FIX] Regression: Prevent duplicated .jpg on file upload
* refactor to all files typed as image/jpeg
* isolate regexp to function
* refactor forceJpgExtension
* clean
* minor tweak
* refactored comment
* Chore: Migrate lib/utils to TypeScript (#3637)
* Migrate utils to TypeScript
* Add @types/semver
* Refactor compareServerVersion(currentVersion, oldVersion, func) to compareServerVersion(current, func, oldVersion)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate readMessages to TS (#3669)
* Migrate readMessages to TS
* Update IRocketChat interface
* [FIX] Unnecessary login dispatch on adding new server (#3693)
* [FIX] Disable tap gesture on call messages (#3694)
* [IMPROVE] Keep biometry option from last session (#3668)
Co-authored-by: GleidsonDaniel <gleidson10daniel@hotmail.com>
Co-authored-by: Reinaldo Neto <reinaldonetof@hotmail.com>
* Fix reactotron multiple connections (#3622)
* Chore: Fix rocketchat interface (#3705)
* Chore: Migrate logout to Typescript (#3688)
* [NEW] Stream to get individual presence updates (#3606)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [FIX] Inject Redux store to prevent/remove require cycles (#3691)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate lib/rocketchat.js to TS - structure PoC (#3661)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
* [FIX] #3606 merged using wrong JS SDK branch (#3709)
* [FIX] Remove deprecated database methods and other database operations (#3686)
* Fix PK error on subscriptions/room
* Instead of checking for pending update, wrap the call on a try catch and return null in case of error
* Generate delete operations before create/update to prevent errors
* Apply same logic on encryption
* Fix database operations on getRoles
* Fix a few database issues found on Bugsnag on ThreadMessagesView
* Run prettier :(
* Chore: Add REST API definitions from server (#3721)
* create first definitions
* chore: implements get and post types
* fix lint
* add ts-ignore
* add teams.removeRoom method
* Remove unused endpoints
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Move some methods to SDK (#3736)
* [IMPROVE] Add support for ephemeral messages inside threads (#3687)
* Chore: dehydrate small server requests away from rocketchat.js (#3740)
* Bump version to 4.25.0 (#3745)
* [Snyk] Security upgrade url-parse from 1.5.1 to 1.5.6 (#3746)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-URLPARSE-2401205
* Language update from LingoHub 🤖 on 2022-02-14Z (#3730)
* Language update from LingoHub 🤖
Project Name: Rocket.Chat.ReactNative
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat-dot-reactnative
User: Robot LingoHub
Easy language translations with LingoHub 🚀
* remove draft gl
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/getSingleMessage to TS (#3700)
* migrate getSingleMessage to TS
* minor tweak
* Chore: Migrate methods/getRooms to TS (#3702)
* migrate getRooms to TS
* add sdk and set any types
* Moved the new variable around and added ts-ignore to follow the pattern from /services/restApi.ts
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate updateMessages to Typescript (#3715)
* Chore: Migrate selector/login to TS (#3731)
* migrate selector/login to TS
* Fix lint errors
* set aliases for returns
* Chore: Migrate helpers/parseUrls to Typescript (#3735)
* Chore: Migrate methods/helpers/parseQuery to Typescript (#3742)
* Chore: Migrate methods/helpers/parseQuery to Typescript
* tweak in example
* Chore: Migrate app/commands to typescript (#3697)
* Chore: Migrate lib/encryption folder to TypeScript (#3639)
* Initial commit
* add types/bytebuffer, add type definitions to params and update interfaces
* add more types and type assertions
* update types
* change bang operator by type assertion and update class variables definitions
* add types for deferred class
* minor tweaks on types definitions
* add ts-ignore
* Update encryption.ts
* update deferred and encryption
* update encryption.ts
* Update room.ts
* update toDecrypt type
* initialize sessionKeyExportedString
* remove return types
* Chore: Migrate redux actions/enterpriseModules to TS (#3698)
* migrate enterpriseModules to TS
* update test file
* Chore: Migrate database/services and database/utils to TS (#3708)
* migrate database services and utils to ts
* Migrate tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate buildMessage to TS (#3732)
* migrate buildMessage to TS
* Fix lint
* minor tweak
* minor tweaks
* Chore: Migrate getPermissions to Typescript (#3720)
* Migrating...
* Fix IPermission
* Playing with types
* Remove `as const`
* Fix lint
* Fix test
* Apply sdk
* Fix lint and autocomplete
* [FIX] Add search and fix pagination for omnichannels departments (#3621)
* [FIX] Search and pagination for omnichannels departments
* pagination complete
* minor tweak
* renamed a param and workaround for a ux bug
* fix style of flatlist and search as header scrollable
* stick the header
* Merge branch 'fix.forward-department-list' of https://github.com/RocketChat/Rocket.Chat.ReactNative into fix.forward-department-list
* refactor pagination
* fix value type
* refactor render search
* refactor layout
* make ts happy
* Chore: Migrate Markdown to Typescript (#3558)
* Chore: Migrate Markdown to TS
* Chore: Migrate Markdown to TS
* minor tweak
* added preview where markdown was preview and fixed params within markdown
* removed ts-ignore
* fix lint
* removed numbersofline={0} and default value to numberOfLines=1
* change how to import markdown preview and remove numberOfLines
* using useTheme inside markdownPreview and remove theme from components
* minor tweak on interfaces
* isNewMarkdown return as boolean
* minor tweaks
* minor tweaks
* removed unused component
* fixed markdown stories
* updated snapshot because removed numberOfLines={0} from message/content
* create IEmoji.ts in definitions and refactor all places where getCustomEmoji was called
* onLinkPress typed
* todo: refactor navtoroominfo
* formatText.test.ts
* markdown stories to typescript too
* minor tweak
* IMessage definition
* refactor: update new types and interfaces for use ISubscription
* refactor: update threadItem for use new MarkdownPreview
* refactor: rollback wrong file commited
* formatHyperlink
* fix lint
* updated item story shot
* refactor and refactor some types
* Remove non-null assertion
* Minor change on useRealName
* tweak
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/callJitsi to typescript (#3660)
* chore: migrate callJitsi to typescript
* change fixed string to type
* wip
* wip
* back to old times :)
* back to typescript
* Chore: Migrate redux module room to typescript (#3636)
* chore: migrate redux module room to typescript and remove dispatch on dependencies
* chore: add tests to redux module room
* chore: create ERoomType and use on implemention
* chore: update enum name
* fix test id
* Chore: Migrate redux module login to typescript (#3647)
* chore: migrate redux module login to typescript
chore: update redux module login tests
* update workers
* wip
* fix type
* remove partial
* add more status
* migrate the rest of the stuff to typescript
* fix tests and types
* fix types and tests
* Chore: Migrate method getSettings to typescript (#3703)
* chore: migrate getSettings to typescript and and some types
* chore: remove this and add current to code
* chore: add current
* Chore: Migrate getCustomEmojis to TS (#3724)
* update customEmoji interface and getCustomEmoji
* add sdk
* updated emojiCustom rest definition
* minor refactor
* update params object
* [FIX] getRooms request using param with wrong name (#3761)
* Chore: Migrate methods/getRoomInfo to TS (#3695)
* migrate getRoomInfo to TS
* update room type
* update types
* Fix lint error
* Chore: Migrate getSlashCommands to TS (#3711)
* migrate getSlashCommands to TS
* use sdk and update getSlashCommands
* minor tweak
* Remove implicit anys
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate getUsersPresence to TS (#3717)
* migrate getUsersPresence to ts
* use sdk and remove this context from getUsersPresence
* Chore: Migrate loadMissedMessages to typescript (#3704)
* chore: migrate loadMissedMessages to typescript
* remove loaderItem
* remove this from functions
* Chore: Migrate methods/getRoles to Typescript (#3741)
* chore: migrate getRoles to ts
* chore: removing unused const
* chore: minor tweak
* Type batch
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/loadMessagesForRoom to Typescript (#3701)
* chore: change loadMessagesForRoom to typescript
* minor tweak
* chore: minor tweaks after merge with developer
* chore: minor tweaks after merge with developer
* chore: minor tweak
* chore: minor tweaks
* Fix return
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
* Chore: Migrate methods/sendFileMessage to typescript (#3683)
* chore: start the migration
* chore: update sendFileMessage to ts
* chore: removing an `any` from uploadQueue
* chore: minor tweak
* chore: minor tweak
* chore: minor tweaks after merge with developer
* chore: minor tweak after merge develop into current
* [FIX] Differ to Last Session Authenticated (#3667)
* [FIX] Differ to Last Session Authenticated
* Added timesync
* [FIX] Differ to Last Session Authenticated
* Added timesync
* timesync tweaks
* refactor diffLastLocalSession and saveLastLocalAuthentication
* did a race
* Update comment in app/utils/localAuthentication.ts
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* refactor getServerTimeSync and when use this route
* tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/loadNextMessages to typescript (#3719)
* feat: update loadNextMessages to ts
* minor tweak
* chore: minor tweaks after merge with developer
* chore: migrate getFileUrlFromMessage to ts (#3734)
* [IMPROVE] Team system messages feedback (#3771) (#3772)
* almost there
* Update stories
Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Danish Ahmed Mirza <77742477+try-catch-stack@users.noreply.github.com>
Co-authored-by: Reinaldo Neto <reinaldonetof@hotmail.com>
Co-authored-by: Snyk bot <snyk-bot@snyk.io>
2022-02-28 19:03:42 +00:00
|
|
|
navigation.push('RoomActionsView', {
|
2021-10-01 18:12:19 +00:00
|
|
|
rid: this.rid,
|
2022-03-29 18:53:27 +00:00
|
|
|
t: this.t as SubscriptionType,
|
|
|
|
room: room as TSubscriptionModel,
|
2021-10-01 18:12:19 +00:00
|
|
|
member,
|
|
|
|
joined
|
2020-06-15 14:00:46 +00:00
|
|
|
});
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-06-15 14:00:46 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
setReadOnly = async () => {
|
2020-04-13 12:51:16 +00:00
|
|
|
const { room } = this.state;
|
|
|
|
const { user } = this.props;
|
2022-03-29 18:53:27 +00:00
|
|
|
const readOnly = await isReadOnly(room as ISubscription, user.username as string);
|
2020-04-13 12:51:16 +00:00
|
|
|
this.setState({ readOnly });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-04-13 12:51:16 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
init = async () => {
|
2019-04-17 17:01:03 +00:00
|
|
|
try {
|
2019-09-16 20:26:32 +00:00
|
|
|
this.setState({ loading: true });
|
2019-12-13 16:23:20 +00:00
|
|
|
const { room, joined } = this.state;
|
2022-03-29 18:53:27 +00:00
|
|
|
if (!this.rid) {
|
|
|
|
return;
|
|
|
|
}
|
2019-12-13 16:23:20 +00:00
|
|
|
if (this.tmid) {
|
2021-06-15 20:13:42 +00:00
|
|
|
await RoomServices.getThreadMessages(this.tmid, this.rid);
|
2019-12-13 16:23:20 +00:00
|
|
|
} else {
|
|
|
|
const newLastOpen = new Date();
|
2021-06-15 20:13:42 +00:00
|
|
|
await RoomServices.getMessages(room);
|
2019-12-13 16:23:20 +00:00
|
|
|
|
|
|
|
// if room is joined
|
2022-03-29 18:53:27 +00:00
|
|
|
if (joined && 'id' in room) {
|
2019-12-13 16:23:20 +00:00
|
|
|
if (room.alert || room.unread || room.userMentions) {
|
|
|
|
this.setLastOpen(room.ls);
|
|
|
|
} else {
|
|
|
|
this.setLastOpen(null);
|
2019-04-17 17:01:03 +00:00
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
RoomServices.readMessages(room.rid, newLastOpen).catch(e => console.log(e));
|
2019-04-17 17:01:03 +00:00
|
|
|
}
|
2019-12-13 16:23:20 +00:00
|
|
|
}
|
2019-06-28 17:02:30 +00:00
|
|
|
|
2021-03-15 20:16:34 +00:00
|
|
|
const canAutoTranslate = RocketChat.canAutoTranslate();
|
2020-03-30 20:19:01 +00:00
|
|
|
const member = await this.getRoomMember();
|
|
|
|
|
|
|
|
this.setState({ canAutoTranslate, member, loading: false });
|
2019-04-17 17:01:03 +00:00
|
|
|
} catch (e) {
|
2019-09-16 20:26:32 +00:00
|
|
|
this.setState({ loading: false });
|
2022-03-29 18:53:27 +00:00
|
|
|
this.retryInit += 1;
|
2019-12-13 16:23:20 +00:00
|
|
|
if (this.retryInit <= 1) {
|
|
|
|
this.retryInitTimeout = setTimeout(() => {
|
|
|
|
this.init();
|
|
|
|
}, 300);
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-04-17 17:01:03 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
getRoomMember = async () => {
|
2020-03-30 20:19:01 +00:00
|
|
|
const { room } = this.state;
|
2020-04-01 12:28:54 +00:00
|
|
|
const { t } = room;
|
2020-03-30 20:19:01 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room && t === 'd' && !RocketChat.isGroupChat(room)) {
|
2020-03-30 20:19:01 +00:00
|
|
|
try {
|
2020-04-09 05:20:57 +00:00
|
|
|
const roomUserId = RocketChat.getUidDirectMessage(room);
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setState({ roomUserId }, () => this.setHeader());
|
2020-04-01 12:28:54 +00:00
|
|
|
|
2020-03-30 20:19:01 +00:00
|
|
|
const result = await RocketChat.getUserInfo(roomUserId);
|
|
|
|
if (result.success) {
|
|
|
|
return result.user;
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return {};
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-03-30 20:19:01 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
findAndObserveRoom = async (rid: string) => {
|
2019-09-16 20:26:32 +00:00
|
|
|
try {
|
|
|
|
const db = database.active;
|
2021-03-15 20:16:34 +00:00
|
|
|
const subCollection = await db.get('subscriptions');
|
2019-09-16 20:26:32 +00:00
|
|
|
const room = await subCollection.find(rid);
|
|
|
|
this.setState({ room });
|
2020-02-28 17:39:17 +00:00
|
|
|
if (!this.tmid) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.setHeader();
|
2020-02-28 17:39:17 +00:00
|
|
|
}
|
2019-09-16 20:26:32 +00:00
|
|
|
this.observeRoom(room);
|
|
|
|
} catch (error) {
|
|
|
|
if (this.t !== 'd') {
|
|
|
|
console.log('Room not found');
|
|
|
|
this.internalSetState({ joined: false });
|
2020-02-21 15:59:13 +00:00
|
|
|
}
|
|
|
|
if (this.rid) {
|
|
|
|
// We navigate to RoomView before the Room is inserted to the local db
|
2019-09-16 20:26:32 +00:00
|
|
|
// So we retry just to make sure we have the right content
|
|
|
|
this.retryFindCount = this.retryFindCount + 1 || 1;
|
|
|
|
if (this.retryFindCount <= 3) {
|
|
|
|
this.retryFindTimeout = setTimeout(() => {
|
|
|
|
this.findAndObserveRoom(rid);
|
|
|
|
this.init();
|
|
|
|
}, 300);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
unsubscribe = async () => {
|
2020-02-05 13:34:53 +00:00
|
|
|
if (this.sub && this.sub.unsubscribe) {
|
|
|
|
await this.sub.unsubscribe();
|
2019-09-27 20:29:25 +00:00
|
|
|
}
|
2020-02-05 13:34:53 +00:00
|
|
|
delete this.sub;
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-27 20:29:25 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
observeRoom = (room: TSubscriptionModel) => {
|
2019-09-16 20:26:32 +00:00
|
|
|
const observable = room.observe();
|
2021-10-01 18:12:19 +00:00
|
|
|
this.subSubscription = observable.subscribe(changes => {
|
2022-03-29 18:53:27 +00:00
|
|
|
const roomUpdate = roomAttrsUpdate.reduce((ret: any, attr) => {
|
2021-10-01 18:12:19 +00:00
|
|
|
ret[attr] = changes[attr];
|
|
|
|
return ret;
|
|
|
|
}, {});
|
|
|
|
if (this.mounted) {
|
|
|
|
this.internalSetState({ room: changes, roomUpdate });
|
|
|
|
} else {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2021-10-01 18:12:19 +00:00
|
|
|
this.state.room = changes;
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2021-10-01 18:12:19 +00:00
|
|
|
this.state.roomUpdate = roomUpdate;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
errorActionsShow = (message: TAnyMessageModel) => {
|
|
|
|
// @ts-ignore
|
2020-06-15 19:35:45 +00:00
|
|
|
this.messageErrorActions?.showMessageErrorActions(message);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onEditInit = (message: TAnyMessageModel) => {
|
2021-03-15 20:16:34 +00:00
|
|
|
const newMessage = {
|
|
|
|
id: message.id,
|
|
|
|
subscription: {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore TODO: we can remove this after we merge a PR separating IMessage vs IMessageFromServer
|
2021-03-15 20:16:34 +00:00
|
|
|
id: message.subscription.id
|
|
|
|
},
|
|
|
|
msg: message?.attachments?.[0]?.description || message.msg
|
2022-04-28 18:44:40 +00:00
|
|
|
} as TMessageModel;
|
2021-03-15 20:16:34 +00:00
|
|
|
this.setState({ selectedMessage: newMessage, editing: true });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
|
|
|
onEditCancel = () => {
|
2022-03-29 18:53:27 +00:00
|
|
|
this.setState({ selectedMessage: undefined, editing: false });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onEditRequest = async (message: TAnyMessageModel) => {
|
|
|
|
this.setState({ selectedMessage: undefined, editing: false });
|
2019-09-16 20:26:32 +00:00
|
|
|
try {
|
|
|
|
await RocketChat.editMessage(message);
|
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onReplyInit = (message: TAnyMessageModel, mention: boolean) => {
|
2019-09-16 20:26:32 +00:00
|
|
|
this.setState({
|
2021-10-01 18:12:19 +00:00
|
|
|
selectedMessage: message,
|
|
|
|
replying: true,
|
|
|
|
replyWithMention: mention
|
2019-09-16 20:26:32 +00:00
|
|
|
});
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
|
|
|
onReplyCancel = () => {
|
2022-03-29 18:53:27 +00:00
|
|
|
this.setState({ selectedMessage: undefined, replying: false, replyWithMention: false });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onReactionInit = (message: TAnyMessageModel) => {
|
2020-06-15 19:35:45 +00:00
|
|
|
this.setState({ selectedMessage: message, reacting: true });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
|
|
|
onReactionClose = () => {
|
2022-03-29 18:53:27 +00:00
|
|
|
this.setState({ selectedMessage: undefined, reacting: false });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onMessageLongPress = (message: TAnyMessageModel) => {
|
|
|
|
// @ts-ignore
|
2020-06-15 19:35:45 +00:00
|
|
|
this.messageActions?.showMessageActions(message);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2018-02-19 21:19:39 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
showAttachment = (attachment: IAttachment) => {
|
2019-12-18 21:13:11 +00:00
|
|
|
const { navigation } = this.props;
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2019-12-18 21:13:11 +00:00
|
|
|
navigation.navigate('AttachmentView', { attachment });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-20 20:43:50 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onReactionPress = async (shortname: string, messageId: string) => {
|
2018-05-18 17:55:08 +00:00
|
|
|
try {
|
2019-09-16 20:26:32 +00:00
|
|
|
await RocketChat.setReaction(shortname, messageId);
|
|
|
|
this.onReactionClose();
|
2020-02-03 18:28:18 +00:00
|
|
|
Review.pushPositiveEvent();
|
2018-05-18 17:55:08 +00:00
|
|
|
} catch (e) {
|
2019-08-23 13:18:47 +00:00
|
|
|
log(e);
|
2018-01-30 19:48:26 +00:00
|
|
|
}
|
|
|
|
};
|
2017-08-04 00:34:37 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onReactionLongPress = (message: TAnyMessageModel) => {
|
2019-05-20 20:43:50 +00:00
|
|
|
this.setState({ selectedMessage: message, reactionsModalVisible: true });
|
2019-06-28 17:07:17 +00:00
|
|
|
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-20 20:43:50 +00:00
|
|
|
|
|
|
|
onCloseReactionsModal = () => {
|
2022-03-29 18:53:27 +00:00
|
|
|
this.setState({ selectedMessage: undefined, reactionsModalVisible: false });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-20 20:43:50 +00:00
|
|
|
|
2020-09-11 14:31:38 +00:00
|
|
|
onEncryptedPress = () => {
|
|
|
|
logEvent(events.ROOM_ENCRYPTED_PRESS);
|
|
|
|
const { navigation, isMasterDetail } = this.props;
|
|
|
|
|
|
|
|
const screen = { screen: 'E2EHowItWorksView', params: { showCloseModal: true } };
|
|
|
|
|
|
|
|
if (isMasterDetail) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-09-11 14:31:38 +00:00
|
|
|
return navigation.navigate('ModalStackNavigator', screen);
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-09-11 14:31:38 +00:00
|
|
|
navigation.navigate('E2ESaveYourPasswordStackNavigator', screen);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-09-11 14:31:38 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
onDiscussionPress = debounce(
|
2022-03-29 18:53:27 +00:00
|
|
|
(item: TAnyMessageModel) => {
|
2021-10-01 18:12:19 +00:00
|
|
|
const { navigation } = this.props;
|
|
|
|
navigation.push('RoomView', {
|
2022-03-29 18:53:27 +00:00
|
|
|
rid: item.drid as string,
|
2021-10-01 18:12:19 +00:00
|
|
|
prid: item.rid,
|
|
|
|
name: item.msg,
|
2022-03-29 18:53:27 +00:00
|
|
|
t: 'p' as SubscriptionType
|
2021-10-01 18:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
1000,
|
|
|
|
true
|
|
|
|
);
|
2019-04-08 12:35:28 +00:00
|
|
|
|
2019-08-22 19:15:30 +00:00
|
|
|
// eslint-disable-next-line react/sort-comp
|
2021-10-01 18:12:19 +00:00
|
|
|
updateUnreadCount = async () => {
|
2022-03-29 18:53:27 +00:00
|
|
|
if (!this.rid) {
|
|
|
|
return;
|
|
|
|
}
|
2019-09-16 20:26:32 +00:00
|
|
|
const db = database.active;
|
Merge 4.25.0 into single-server (#3790)
* Chore: Migrate DefaultBrowserView to Typescript (#3488)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate PickerView to Typescript (#3501)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate AttachmentView to Typescript (#3483)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate MarkdownTableView to Typescript (#3500)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EEncryptionSecurityView to Typescript (#3489)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EEnterYourPasswordView to Typescript (#3490)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2EHowItWorksView to Typescript (#3492)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate E2ESaveYourPasswordView to Typescript (#3493)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ForgotPasswordView to Typescript (#3496)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ForwardLivechatView to Typescript (#3497)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate JitsiMeetView to Typescript (#3498)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Push notifications user preference not syncing correctly (#3494)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Display prefs showing wrong header icon on tablet (#3510)
* Merge 4.22.0 into master (#3523)
* Tests: Make Detox work on Android (#3051)
* Chore: Migrate NewMessageView to Typescript (#3502)
* Chore: Migrate ScreenLockConfigView to Typescript (#3517)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ScreenLockedView to Typescript (#3515)
* Chore: Migrate SecurityPrivacyView to Typescript (#3518)
* Chore: Migrate SelectListView to Typescript (#3519)
* Chore: Migrate SelectServerView to Typescript (#3521)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate SetUsernameView to Typescript (#3526)
* Chore: Migrate ThemeView to Typescript (#3522)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate StatusView to Typescript (#3527)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate ShareListView to Typescript (#3459)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* Chore: Migrate TeamChannelsView to Typescript (#3532)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* Language update from LingoHub 🤖 (#3529)
Project Name: Rocket.Chat.ReactNative
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat-dot-reactnative
User: Robot LingoHub
Easy language translations with LingoHub 🚀
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate react-navigation to TypeScript (#3480)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Bump version to 4.23.0 (#3546)
* [FIX] Certificate stops working after app update on iOS (#3537)
* [IMPROVE] Connection stability (#3531)
* [NEW] Permission for uploading files (#3505)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Files screen stopped listing content on server 4.2 (#3541)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate ModalBlockView to Typescript (#3503)
* Chore: Migrate ModalBlockView to Typescript
* minor tweaks
* update the navigator
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate SelectedUsersView to Typescript (#3520)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVE] Remove Omnichannel visitor's navigation history (#3534)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Merge 4.23.0 into master (#3574)
* [FIX] Download video/quicktime in iOS (#3581)
* Chore: Migrate Redux to Typescript PoC (#3565)
* Chore: Migrate Model's folder to Typescript (#3564)
* Chore: Migrate lib user preferences to Typescript (#3578)
* Chore: Update React Native Device Info to 8.4.8 (#3560)
* [FIX] Roles rendering on dark theme (#3589)
* fix: Add height verification to fix modal dimension (#3573)
* chore: Change the lib `@types/url-parse` to devDependencies (#3585)
* [FIX] teams.removeMembers mobile usage (#3557)
* Chore: Migrate DisplayPrefsView to Typescript (#3555)
* Chore: Migrate Utils Folder to Typescript (#3544)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* Chore: Migrate ThreadMessagesView to Typescript (#3538)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
* [FIX] RoomInfoView displaying different info depending on the origin (#3586)
Co-authored-by: GleidsonDaniel <gleidson10daniel@hotmail.com>
* [FIX] Message parser switch not updating field properly (#3576)
* [FIX] Lint not ignoring Markdown props (#3600)
* Bump version to 4.24.0 (#3601)
* Chore: Migrate notification/push to Typescript (#3587)
* chore: migrate connect to ts and add tests
* chore: add more tests
* Chore: Update react-native-device-info patch-package and pods (#3605)
* [FIX] App crashes when entering server after applying certificate (Android) (#3579)
* chore: migrate redux module encryption to typescript
* chore: migrate customEmoji to typescript and add tests
* chore: create IPreferences interface
* chore: migrate redux module sortPreferences to typescript
* chore: fix IPreference interface and organize import
* chore: migrate to typescript
* chore: migrate usersTyping to typescript
* Add DiscussionDetails and Item for DiscussionsView; update ThreadDetails, BackgroundContainer and DiscussionsView
* chore: migrate settings to typescript
* chore: add interface to IStateAplication
* chore: migrate redux module room to typescript
* update definitions
* chore: fix error on error interface
* [FIX] Joining and leaving messages in teams (#3591)
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* minor tweak
* [FIX] TypeScript's errors raised by HOCs (#3535)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* chore: migrate redux module roles to typescript
* wip: add IRoles to IAplicationState interface
* add storybooks, update snapshots and DiscussionsView
* Minor tweaks
* Fix lint
* Remove unused import
* chore: migrate redux module inviteUsers to typescript
* chore: migrate messages action to typescript
* chore: fix any interface and change null to empty string
* chore: implements IAplicationState on type
* chore: remove mapDispatchToProps and continue ts migration
* chore: fix types and apply IAplicationState to types
* Migrate redux server action/reducer to ts
* add tests
* [FIX] App crashes when opening a notification while app is closed (#3629)
* [FIX] makeThreadName asserting undefined as non-null (#3628)
* [FIX] Threads' pagination not working (#3631)
* update tests
* chore: update settings value types
* Send missing params to selectServerRequest
* [IMPROVE] Convert HEIC images to JPG and remove compression (#3633)
* update interface
* update action definition
* Move onDiscussionpress logic on message, update SearchHeader and DiscussionDetails component, add useLayoutEffect at DiscussionsView
* Update interfaces and minor tweaks to DiscussionsView screen and components
* Fix navigation logic and update interfaces
* Minor tweaks
* Undo change on project.pbxproj
* Update project.pbxproj
* Update project.pbxproj
* Remove style.ts
* Minor tweak
* update snapshots
* Merge 4.24.0 into master (#3648)
* Chore: Change console.log to console.error when logging error
* chore: add as string to fix type
* Fix lint
* fix types
* test
* Remove console.log
* test
* [FIX] StoryShots not working for async rendered components (#3677)
* remove console.log
* Add missing DiscussionsView snapshot
* fix build and useless done and async generator
* update snapshot
* Chore: fix build and useless done and async generator (#3678)
* fix build and useless done and async generator
* update snapshot
* Chore: Migrate Database to Typescript (#3580)
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module permissions to typescript (#3630)
* Chore: Migrate redux module share to typescript (#3612)
* chore: migrate redux module share to typescript
* chore: fix types
* chore: update types
* chore: migrate redux module share to typescript
* remove double import
* chore: fix import
* Chore: Migrate redux module createChannel to typescript (#3602)
* chore: migrate createChannel to ts and add tests
* chore: fix naming
* chore: add more types and remove mapDispatchToProps from components
* remove todo
* update tests
* chore: migrate interface to reducer and fix errors on return
* chore: insert IApplicationState to mapStateToProps state type
* Remove spread
* fix type
* fix import and state type
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module app to typescript (#3598)
* chore: migrate activeUsers reducer and action to TS
* chore: init types folder and set redux and BaseScreen interface
* chore: remove mapDispatchToProps to use dispatch prop and clear some types
* chore: type selectedUsers action and reducer and improvement in the code of other files
* chore: move IUser to base types
* chore: move state props to ISelectedUsersViewProps
* chore: create mocketStore
* chore: remove applyAppStateMiddleware
* test: create activeUser and selectedUser tests
* test: add more selectedUsers tests
* chore: fix action type
* chore: move types to definition folder and fix imports
* chore: remove unused const
* chore: migrate redux tests to reducer folder and add eslint jest plugin
* chore: exprot initial state and then import on tests
* chore: move interfaces to reducer and import on screen
* chore: set eslint-plugin-jest version to 24.7.0
* chore: fix IUser import
* chore: update interfaces and types names
* chore: update definitions
* chore: update IBaseScreen definitions
* chore: init reducer/app migration to ts
* chore: add tests and migrate RootEnum
* wip: migrate fixed consts to RootEnum
* chore: remove redux action inferences
* fix types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate redux module createDiscussion to typescript (#3604)
* chore: migrate createDiscussion to ts and add tests
* chore: add TActionCreateDiscussion to TApplicationActions
* fix types
* update types
* fix types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] ios-testflight-experimental unable to find cache (#3684)
* Chore: Remove Non-null assertion operator in ThreadMessagesView (#3632)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate CannedResponsesListView to Typescript (#3553)
* Chore: Migrate CannedResponsesListView to TS
* Moved IcannedResponse to definitions and fixed the index
* Chore: Migrate CannedResponseDetail to TS
* minor tweaks
* refactor: update new types and interfaces for use ISubscription
* fix lint error and canned responses's dropdown
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate LivechatEditView to Typescript (#3499)
* Chore: Migrate LivechatEditView to Typescript
* refactor: minor tweak
* refactor: fix the interfaces for input
* refactor: fix lint erros
* minor tweak with new navigation types
* function
* iroom tweak
* livechateditview tweak
* TextInput tweak
* refactor: update new types and interfaces for use ISubscription
* refactor to default useState type
* change the component name in SearchBox
* changed state type
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Regression: Message press navigating to empty RoomView (#3680)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Regression: Prevent duplicated .jpg on file upload (#3658)
* [FIX] Regression: Prevent duplicated .jpg on file upload
* refactor to all files typed as image/jpeg
* isolate regexp to function
* refactor forceJpgExtension
* clean
* minor tweak
* [FIX] Regression: Prevent duplicated .jpg on file upload
* refactor to all files typed as image/jpeg
* isolate regexp to function
* refactor forceJpgExtension
* clean
* minor tweak
* refactored comment
* Chore: Migrate lib/utils to TypeScript (#3637)
* Migrate utils to TypeScript
* Add @types/semver
* Refactor compareServerVersion(currentVersion, oldVersion, func) to compareServerVersion(current, func, oldVersion)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate readMessages to TS (#3669)
* Migrate readMessages to TS
* Update IRocketChat interface
* [FIX] Unnecessary login dispatch on adding new server (#3693)
* [FIX] Disable tap gesture on call messages (#3694)
* [IMPROVE] Keep biometry option from last session (#3668)
Co-authored-by: GleidsonDaniel <gleidson10daniel@hotmail.com>
Co-authored-by: Reinaldo Neto <reinaldonetof@hotmail.com>
* Fix reactotron multiple connections (#3622)
* Chore: Fix rocketchat interface (#3705)
* Chore: Migrate logout to Typescript (#3688)
* [NEW] Stream to get individual presence updates (#3606)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [FIX] Inject Redux store to prevent/remove require cycles (#3691)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate lib/rocketchat.js to TS - structure PoC (#3661)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
* [FIX] #3606 merged using wrong JS SDK branch (#3709)
* [FIX] Remove deprecated database methods and other database operations (#3686)
* Fix PK error on subscriptions/room
* Instead of checking for pending update, wrap the call on a try catch and return null in case of error
* Generate delete operations before create/update to prevent errors
* Apply same logic on encryption
* Fix database operations on getRoles
* Fix a few database issues found on Bugsnag on ThreadMessagesView
* Run prettier :(
* Chore: Add REST API definitions from server (#3721)
* create first definitions
* chore: implements get and post types
* fix lint
* add ts-ignore
* add teams.removeRoom method
* Remove unused endpoints
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Move some methods to SDK (#3736)
* [IMPROVE] Add support for ephemeral messages inside threads (#3687)
* Chore: dehydrate small server requests away from rocketchat.js (#3740)
* Bump version to 4.25.0 (#3745)
* [Snyk] Security upgrade url-parse from 1.5.1 to 1.5.6 (#3746)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-URLPARSE-2401205
* Language update from LingoHub 🤖 on 2022-02-14Z (#3730)
* Language update from LingoHub 🤖
Project Name: Rocket.Chat.ReactNative
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat-dot-reactnative
User: Robot LingoHub
Easy language translations with LingoHub 🚀
* remove draft gl
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/getSingleMessage to TS (#3700)
* migrate getSingleMessage to TS
* minor tweak
* Chore: Migrate methods/getRooms to TS (#3702)
* migrate getRooms to TS
* add sdk and set any types
* Moved the new variable around and added ts-ignore to follow the pattern from /services/restApi.ts
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate updateMessages to Typescript (#3715)
* Chore: Migrate selector/login to TS (#3731)
* migrate selector/login to TS
* Fix lint errors
* set aliases for returns
* Chore: Migrate helpers/parseUrls to Typescript (#3735)
* Chore: Migrate methods/helpers/parseQuery to Typescript (#3742)
* Chore: Migrate methods/helpers/parseQuery to Typescript
* tweak in example
* Chore: Migrate app/commands to typescript (#3697)
* Chore: Migrate lib/encryption folder to TypeScript (#3639)
* Initial commit
* add types/bytebuffer, add type definitions to params and update interfaces
* add more types and type assertions
* update types
* change bang operator by type assertion and update class variables definitions
* add types for deferred class
* minor tweaks on types definitions
* add ts-ignore
* Update encryption.ts
* update deferred and encryption
* update encryption.ts
* Update room.ts
* update toDecrypt type
* initialize sessionKeyExportedString
* remove return types
* Chore: Migrate redux actions/enterpriseModules to TS (#3698)
* migrate enterpriseModules to TS
* update test file
* Chore: Migrate database/services and database/utils to TS (#3708)
* migrate database services and utils to ts
* Migrate tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate buildMessage to TS (#3732)
* migrate buildMessage to TS
* Fix lint
* minor tweak
* minor tweaks
* Chore: Migrate getPermissions to Typescript (#3720)
* Migrating...
* Fix IPermission
* Playing with types
* Remove `as const`
* Fix lint
* Fix test
* Apply sdk
* Fix lint and autocomplete
* [FIX] Add search and fix pagination for omnichannels departments (#3621)
* [FIX] Search and pagination for omnichannels departments
* pagination complete
* minor tweak
* renamed a param and workaround for a ux bug
* fix style of flatlist and search as header scrollable
* stick the header
* Merge branch 'fix.forward-department-list' of https://github.com/RocketChat/Rocket.Chat.ReactNative into fix.forward-department-list
* refactor pagination
* fix value type
* refactor render search
* refactor layout
* make ts happy
* Chore: Migrate Markdown to Typescript (#3558)
* Chore: Migrate Markdown to TS
* Chore: Migrate Markdown to TS
* minor tweak
* added preview where markdown was preview and fixed params within markdown
* removed ts-ignore
* fix lint
* removed numbersofline={0} and default value to numberOfLines=1
* change how to import markdown preview and remove numberOfLines
* using useTheme inside markdownPreview and remove theme from components
* minor tweak on interfaces
* isNewMarkdown return as boolean
* minor tweaks
* minor tweaks
* removed unused component
* fixed markdown stories
* updated snapshot because removed numberOfLines={0} from message/content
* create IEmoji.ts in definitions and refactor all places where getCustomEmoji was called
* onLinkPress typed
* todo: refactor navtoroominfo
* formatText.test.ts
* markdown stories to typescript too
* minor tweak
* IMessage definition
* refactor: update new types and interfaces for use ISubscription
* refactor: update threadItem for use new MarkdownPreview
* refactor: rollback wrong file commited
* formatHyperlink
* fix lint
* updated item story shot
* refactor and refactor some types
* Remove non-null assertion
* Minor change on useRealName
* tweak
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/callJitsi to typescript (#3660)
* chore: migrate callJitsi to typescript
* change fixed string to type
* wip
* wip
* back to old times :)
* back to typescript
* Chore: Migrate redux module room to typescript (#3636)
* chore: migrate redux module room to typescript and remove dispatch on dependencies
* chore: add tests to redux module room
* chore: create ERoomType and use on implemention
* chore: update enum name
* fix test id
* Chore: Migrate redux module login to typescript (#3647)
* chore: migrate redux module login to typescript
chore: update redux module login tests
* update workers
* wip
* fix type
* remove partial
* add more status
* migrate the rest of the stuff to typescript
* fix tests and types
* fix types and tests
* Chore: Migrate method getSettings to typescript (#3703)
* chore: migrate getSettings to typescript and and some types
* chore: remove this and add current to code
* chore: add current
* Chore: Migrate getCustomEmojis to TS (#3724)
* update customEmoji interface and getCustomEmoji
* add sdk
* updated emojiCustom rest definition
* minor refactor
* update params object
* [FIX] getRooms request using param with wrong name (#3761)
* Chore: Migrate methods/getRoomInfo to TS (#3695)
* migrate getRoomInfo to TS
* update room type
* update types
* Fix lint error
* Chore: Migrate getSlashCommands to TS (#3711)
* migrate getSlashCommands to TS
* use sdk and update getSlashCommands
* minor tweak
* Remove implicit anys
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate getUsersPresence to TS (#3717)
* migrate getUsersPresence to ts
* use sdk and remove this context from getUsersPresence
* Chore: Migrate loadMissedMessages to typescript (#3704)
* chore: migrate loadMissedMessages to typescript
* remove loaderItem
* remove this from functions
* Chore: Migrate methods/getRoles to Typescript (#3741)
* chore: migrate getRoles to ts
* chore: removing unused const
* chore: minor tweak
* Type batch
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/loadMessagesForRoom to Typescript (#3701)
* chore: change loadMessagesForRoom to typescript
* minor tweak
* chore: minor tweaks after merge with developer
* chore: minor tweaks after merge with developer
* chore: minor tweak
* chore: minor tweaks
* Fix return
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
* Chore: Migrate methods/sendFileMessage to typescript (#3683)
* chore: start the migration
* chore: update sendFileMessage to ts
* chore: removing an `any` from uploadQueue
* chore: minor tweak
* chore: minor tweak
* chore: minor tweaks after merge with developer
* chore: minor tweak after merge develop into current
* [FIX] Differ to Last Session Authenticated (#3667)
* [FIX] Differ to Last Session Authenticated
* Added timesync
* [FIX] Differ to Last Session Authenticated
* Added timesync
* timesync tweaks
* refactor diffLastLocalSession and saveLastLocalAuthentication
* did a race
* Update comment in app/utils/localAuthentication.ts
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* refactor getServerTimeSync and when use this route
* tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Chore: Migrate methods/loadNextMessages to typescript (#3719)
* feat: update loadNextMessages to ts
* minor tweak
* chore: minor tweaks after merge with developer
* chore: migrate getFileUrlFromMessage to ts (#3734)
* [IMPROVE] Team system messages feedback (#3771) (#3772)
* almost there
* Update stories
Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
Co-authored-by: Danish Ahmed Mirza <77742477+try-catch-stack@users.noreply.github.com>
Co-authored-by: Reinaldo Neto <reinaldonetof@hotmail.com>
Co-authored-by: Snyk bot <snyk-bot@snyk.io>
2022-02-28 19:03:42 +00:00
|
|
|
const observable = await db
|
2019-09-16 20:26:32 +00:00
|
|
|
.get('subscriptions')
|
2021-10-01 18:12:19 +00:00
|
|
|
.query(Q.where('archived', false), Q.where('open', true), Q.where('rid', Q.notEq(this.rid)))
|
2019-09-16 20:26:32 +00:00
|
|
|
.observeWithColumns(['unread']);
|
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
this.queryUnreads = observable.subscribe(data => {
|
2020-06-15 14:00:46 +00:00
|
|
|
const { unreadsCount } = this.state;
|
|
|
|
const newUnreadsCount = data.filter(s => s.unread > 0).reduce((a, b) => a + (b.unread || 0), 0);
|
|
|
|
if (unreadsCount !== newUnreadsCount) {
|
|
|
|
this.setState({ unreadsCount: newUnreadsCount }, () => this.setHeader());
|
2019-09-16 20:26:32 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
2019-08-22 19:15:30 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onThreadPress = debounce((item: TAnyMessageModel) => this.navToThread(item), 1000, true);
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
shouldNavigateToRoom = (message: IMessage) => {
|
2021-06-15 20:13:42 +00:00
|
|
|
if (message.tmid && message.tmid === this.tmid) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (!message.tmid && message.rid === this.rid) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
jumpToMessageByUrl = async (messageUrl?: string) => {
|
2021-06-15 20:13:42 +00:00
|
|
|
if (!messageUrl) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
this.setState({ showingBlockingLoader: true });
|
|
|
|
const parsedUrl = parse(messageUrl, true);
|
|
|
|
const messageId = parsedUrl.query.msg;
|
2022-03-29 18:53:27 +00:00
|
|
|
if (messageId) {
|
|
|
|
await this.jumpToMessage(messageId);
|
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
this.setState({ showingBlockingLoader: false });
|
|
|
|
} catch (e) {
|
|
|
|
this.setState({ showingBlockingLoader: false });
|
|
|
|
log(e);
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
jumpToMessage = async (messageId: string) => {
|
2021-06-15 20:13:42 +00:00
|
|
|
try {
|
|
|
|
this.setState({ showingBlockingLoader: true });
|
|
|
|
const message = await RoomServices.getMessageInfo(messageId);
|
|
|
|
|
|
|
|
if (!message) {
|
|
|
|
return;
|
2019-09-16 20:26:32 +00:00
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
|
|
|
|
if (this.shouldNavigateToRoom(message)) {
|
|
|
|
if (message.rid !== this.rid) {
|
|
|
|
this.navToRoom(message);
|
|
|
|
} else {
|
|
|
|
this.navToThread(message);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/**
|
|
|
|
* if it's from server, we don't have it saved locally and so we fetch surroundings
|
|
|
|
* we test if it's not from threads because we're fetching from threads currently with `getThreadMessages`
|
|
|
|
*/
|
2022-03-29 18:53:27 +00:00
|
|
|
if (message.fromServer && !message.tmid && this.rid) {
|
2021-06-15 20:13:42 +00:00
|
|
|
await RocketChat.loadSurroundingMessages({ messageId, rid: this.rid });
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2021-10-01 18:12:19 +00:00
|
|
|
await Promise.race([this.list.current.jumpToMessage(message.id), new Promise(res => setTimeout(res, 5000))]);
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2021-06-15 20:13:42 +00:00
|
|
|
this.list.current.cancelJumpToMessage();
|
2020-09-11 14:31:38 +00:00
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
|
|
|
} finally {
|
|
|
|
this.setState({ showingBlockingLoader: false });
|
2019-05-20 20:43:50 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-20 20:43:50 +00:00
|
|
|
|
2022-04-28 18:44:40 +00:00
|
|
|
replyBroadcast = (message: IMessage) => {
|
2022-03-29 18:53:27 +00:00
|
|
|
const { dispatch } = this.props;
|
|
|
|
dispatch(replyBroadcast(message));
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-20 20:43:50 +00:00
|
|
|
|
2019-04-17 17:01:03 +00:00
|
|
|
handleConnected = () => {
|
|
|
|
this.init();
|
|
|
|
EventEmitter.removeListener('connected', this.handleConnected);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-04-17 17:01:03 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
handleRoomRemoved = ({ rid }: { rid: string }) => {
|
2020-03-04 11:49:54 +00:00
|
|
|
const { room } = this.state;
|
|
|
|
if (rid === this.rid) {
|
2020-03-06 13:13:24 +00:00
|
|
|
Navigation.navigate('RoomsListView');
|
2021-10-01 18:12:19 +00:00
|
|
|
!this.isOmnichannel &&
|
|
|
|
showErrorAlert(I18n.t('You_were_removed_from_channel', { channel: RocketChat.getRoomTitle(room) }), I18n.t('Oops'));
|
2020-03-04 11:49:54 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-03-04 11:49:54 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
internalSetState = (...args: any[]) => {
|
2019-05-03 14:54:57 +00:00
|
|
|
if (!this.mounted) {
|
|
|
|
return;
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore TODO: TS is complaining about this, but I don't feel like changing rn since it should be working
|
2018-10-23 21:39:48 +00:00
|
|
|
this.setState(...args);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2018-10-23 21:39:48 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
sendMessage = (message: string, tmid?: string, tshow?: boolean) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_SEND_MESSAGE);
|
2022-03-29 18:53:27 +00:00
|
|
|
const { rid } = this.state.room;
|
2019-07-29 16:33:28 +00:00
|
|
|
const { user } = this.props;
|
2022-03-29 18:53:27 +00:00
|
|
|
RocketChat.sendMessage(rid, message, this.tmid || tmid, user, tshow).then(() => {
|
2019-11-07 19:53:39 +00:00
|
|
|
if (this.list && this.list.current) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2019-11-07 19:53:39 +00:00
|
|
|
this.list.current.update();
|
|
|
|
}
|
2019-03-27 20:06:57 +00:00
|
|
|
this.setLastOpen(null);
|
2020-02-03 18:28:18 +00:00
|
|
|
Review.pushPositiveEvent();
|
2018-02-08 14:08:50 +00:00
|
|
|
});
|
|
|
|
};
|
2017-08-09 01:40:55 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
// TODO: We need to unify
|
|
|
|
getCustomEmoji = (name: string): IReduxEmoji | null => {
|
2019-09-16 20:26:32 +00:00
|
|
|
const { customEmojis } = this.props;
|
|
|
|
const emoji = customEmojis[name];
|
|
|
|
if (emoji) {
|
|
|
|
return emoji;
|
|
|
|
}
|
|
|
|
return null;
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
setLastOpen = (lastOpen: Date | null) => this.setState({ lastOpen });
|
2019-03-27 20:06:57 +00:00
|
|
|
|
2020-12-01 17:30:39 +00:00
|
|
|
onJoin = () => {
|
|
|
|
this.internalSetState({
|
|
|
|
joined: true
|
|
|
|
});
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-12-01 17:30:39 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
joinRoom = async () => {
|
2020-07-31 18:22:30 +00:00
|
|
|
logEvent(events.ROOM_JOIN);
|
2018-05-18 17:55:08 +00:00
|
|
|
try {
|
2020-07-31 18:22:30 +00:00
|
|
|
const { room } = this.state;
|
|
|
|
|
|
|
|
if (this.isOmnichannel) {
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('_id' in room) {
|
|
|
|
await takeInquiry(room._id);
|
|
|
|
}
|
2021-08-31 20:35:31 +00:00
|
|
|
this.onJoin();
|
2020-07-31 18:22:30 +00:00
|
|
|
} else {
|
2022-03-29 18:53:27 +00:00
|
|
|
const { joinCodeRequired, rid } = room;
|
2020-12-01 17:30:39 +00:00
|
|
|
if (joinCodeRequired) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-12-01 17:30:39 +00:00
|
|
|
this.joinCode.current?.show();
|
|
|
|
} else {
|
2022-03-29 18:53:27 +00:00
|
|
|
await RocketChat.joinRoom(rid, null, this.t as any);
|
2020-12-01 17:30:39 +00:00
|
|
|
this.onJoin();
|
|
|
|
}
|
2020-07-31 18:22:30 +00:00
|
|
|
}
|
2018-05-18 17:55:08 +00:00
|
|
|
} catch (e) {
|
2019-08-23 13:18:47 +00:00
|
|
|
log(e);
|
2018-05-18 17:55:08 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2017-08-10 16:16:32 +00:00
|
|
|
|
2022-04-28 18:44:40 +00:00
|
|
|
resumeRoom = async () => {
|
|
|
|
logEvent(events.ROOM_RESUME);
|
|
|
|
try {
|
|
|
|
const { room } = this.state;
|
|
|
|
|
|
|
|
if (this.isOmnichannel) {
|
|
|
|
if ('rid' in room) {
|
|
|
|
await takeResume(room.rid);
|
|
|
|
}
|
|
|
|
this.onJoin();
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
getThreadName = (tmid: string, messageId: string) => {
|
|
|
|
const { rid } = this.state.room;
|
|
|
|
return getThreadName(rid, tmid, messageId);
|
|
|
|
};
|
2019-04-17 17:01:03 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
toggleFollowThread = async (isFollowingThread: boolean, tmid?: string) => {
|
2019-05-15 19:33:30 +00:00
|
|
|
try {
|
2022-03-29 18:53:27 +00:00
|
|
|
const threadMessageId = tmid ?? this.tmid;
|
|
|
|
if (!threadMessageId) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
await RocketChat.toggleFollowMessage(threadMessageId, !isFollowingThread);
|
2020-01-28 13:25:28 +00:00
|
|
|
EventEmitter.emit(LISTENER, { message: isFollowingThread ? I18n.t('Unfollowed_thread') : I18n.t('Following_thread') });
|
2019-05-15 19:33:30 +00:00
|
|
|
} catch (e) {
|
2019-08-23 13:18:47 +00:00
|
|
|
log(e);
|
2019-05-15 19:33:30 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-05-15 19:33:30 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
getBadgeColor = (messageId: string) => {
|
2020-10-30 17:35:07 +00:00
|
|
|
const { room } = this.state;
|
|
|
|
const { theme } = this.props;
|
|
|
|
return getBadgeColor({ subscription: room, theme, messageId });
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-10-30 17:35:07 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
navToRoomInfo = (navParam: any) => {
|
2020-06-15 14:00:46 +00:00
|
|
|
const { navigation, user, isMasterDetail } = this.props;
|
2021-10-01 18:12:19 +00:00
|
|
|
logEvent(events[`ROOM_GO_${navParam.t === 'd' ? 'USER' : 'ROOM'}_INFO`]);
|
2019-08-22 18:08:07 +00:00
|
|
|
if (navParam.rid === user.id) {
|
|
|
|
return;
|
|
|
|
}
|
2020-06-15 14:00:46 +00:00
|
|
|
if (isMasterDetail) {
|
|
|
|
navParam.showCloseModal = true;
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-06-15 14:00:46 +00:00
|
|
|
navigation.navigate('ModalStackNavigator', { screen: 'RoomInfoView', params: navParam });
|
2019-11-25 20:01:17 +00:00
|
|
|
} else {
|
2020-06-15 14:00:46 +00:00
|
|
|
navigation.navigate('RoomInfoView', navParam);
|
2019-11-25 20:01:17 +00:00
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-08-22 18:08:07 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
navToThread = async (item: TAnyMessageModel | { tmid: string }) => {
|
2021-06-15 20:13:42 +00:00
|
|
|
const { roomUserId } = this.state;
|
|
|
|
const { navigation } = this.props;
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if (!this.rid) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-06-15 20:13:42 +00:00
|
|
|
if (item.tmid) {
|
2022-03-29 18:53:27 +00:00
|
|
|
let name = '';
|
|
|
|
let jumpToMessageId = '';
|
|
|
|
if ('id' in item) {
|
|
|
|
name = item.tmsg ?? '';
|
|
|
|
jumpToMessageId = item.id;
|
|
|
|
}
|
2021-06-15 20:13:42 +00:00
|
|
|
if (!name) {
|
2022-03-29 18:53:27 +00:00
|
|
|
const result = await this.getThreadName(item.tmid, jumpToMessageId);
|
2021-10-28 17:49:08 +00:00
|
|
|
// test if there isn't a thread
|
|
|
|
if (!result) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
name = result;
|
2021-06-15 20:13:42 +00:00
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in item && item.t === E2E_MESSAGE_TYPE && item.e2e !== E2E_STATUS.DONE) {
|
2021-06-15 20:13:42 +00:00
|
|
|
name = I18n.t('Encrypted_message');
|
|
|
|
}
|
|
|
|
return navigation.push('RoomView', {
|
2021-10-01 18:12:19 +00:00
|
|
|
rid: this.rid,
|
|
|
|
tmid: item.tmid,
|
|
|
|
name,
|
2022-03-29 18:53:27 +00:00
|
|
|
t: SubscriptionType.THREAD,
|
2021-10-01 18:12:19 +00:00
|
|
|
roomUserId,
|
2022-03-29 18:53:27 +00:00
|
|
|
jumpToMessageId
|
2021-06-15 20:13:42 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('tlm' in item) {
|
2021-06-15 20:13:42 +00:00
|
|
|
return navigation.push('RoomView', {
|
2021-10-01 18:12:19 +00:00
|
|
|
rid: this.rid,
|
|
|
|
tmid: item.id,
|
|
|
|
name: makeThreadName(item),
|
2022-03-29 18:53:27 +00:00
|
|
|
t: SubscriptionType.THREAD,
|
2021-10-01 18:12:19 +00:00
|
|
|
roomUserId
|
2021-06-15 20:13:42 +00:00
|
|
|
});
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
navToRoom = async (message: TAnyMessageModel) => {
|
2021-06-15 20:13:42 +00:00
|
|
|
const { navigation, isMasterDetail } = this.props;
|
|
|
|
const roomInfo = await getRoomInfo(message.rid);
|
|
|
|
return goRoom({
|
2022-03-29 18:53:27 +00:00
|
|
|
item: roomInfo as TGoRoomItem,
|
2021-10-01 18:12:19 +00:00
|
|
|
isMasterDetail,
|
|
|
|
navigationMethod: navigation.push,
|
|
|
|
jumpToMessageId: message.id
|
2021-06-15 20:13:42 +00:00
|
|
|
});
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2019-09-18 17:32:12 +00:00
|
|
|
callJitsi = () => {
|
|
|
|
const { room } = this.state;
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room) {
|
|
|
|
const { jitsiTimeout } = room;
|
|
|
|
if (jitsiTimeout && jitsiTimeout < new Date()) {
|
|
|
|
showErrorAlert(I18n.t('Call_already_ended'));
|
|
|
|
} else {
|
|
|
|
RocketChat.callJitsi(room);
|
|
|
|
}
|
2019-09-18 17:32:12 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
handleCommands = ({ event }: { event: IKeyCommandEvent }) => {
|
2019-11-25 20:01:17 +00:00
|
|
|
if (this.rid) {
|
|
|
|
const { input } = event;
|
|
|
|
if (handleCommandScroll(event)) {
|
|
|
|
const offset = input === 'UIKeyInputUpArrow' ? 100 : -100;
|
|
|
|
this.offset += offset;
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2020-07-08 16:36:37 +00:00
|
|
|
this.flatList?.scrollToOffset({ offset: this.offset });
|
2019-11-25 20:01:17 +00:00
|
|
|
} else if (handleCommandRoomActions(event)) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.goRoomActionsView();
|
2019-11-25 20:01:17 +00:00
|
|
|
} else if (handleCommandSearchMessages(event)) {
|
2020-06-15 14:00:46 +00:00
|
|
|
this.goRoomActionsView('SearchMessagesView');
|
2019-11-25 20:01:17 +00:00
|
|
|
} else if (handleCommandReplyLatest(event)) {
|
|
|
|
if (this.list && this.list.current) {
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2019-11-25 20:01:17 +00:00
|
|
|
const message = this.list.current.getLastMessage();
|
|
|
|
this.onReplyInit(message, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2019-11-25 20:01:17 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
blockAction = ({
|
|
|
|
actionId,
|
|
|
|
appId,
|
|
|
|
value,
|
|
|
|
blockId,
|
|
|
|
rid,
|
|
|
|
mid
|
|
|
|
}: {
|
|
|
|
actionId: string;
|
|
|
|
appId: string;
|
|
|
|
value: any;
|
|
|
|
blockId: string;
|
|
|
|
rid: string;
|
|
|
|
mid: string;
|
|
|
|
}) =>
|
2021-10-01 18:12:19 +00:00
|
|
|
RocketChat.triggerBlockAction({
|
|
|
|
blockId,
|
|
|
|
actionId,
|
|
|
|
value,
|
|
|
|
mid,
|
|
|
|
rid,
|
|
|
|
appId,
|
|
|
|
container: {
|
2022-03-29 18:53:27 +00:00
|
|
|
type: ContainerTypes.MESSAGE,
|
2021-10-01 18:12:19 +00:00
|
|
|
id: mid
|
|
|
|
}
|
|
|
|
});
|
2020-02-11 14:01:35 +00:00
|
|
|
|
2021-10-01 18:12:19 +00:00
|
|
|
closeBanner = async () => {
|
2020-05-08 12:57:04 +00:00
|
|
|
const { room } = this.state;
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room) {
|
|
|
|
try {
|
|
|
|
const db = database.active;
|
|
|
|
await db.write(async () => {
|
|
|
|
await room.update(r => {
|
|
|
|
r.bannerClosed = true;
|
|
|
|
});
|
2020-05-08 12:57:04 +00:00
|
|
|
});
|
2022-03-29 18:53:27 +00:00
|
|
|
} catch {
|
|
|
|
// do nothing
|
|
|
|
}
|
2020-05-08 12:57:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
isIgnored = (message: TAnyMessageModel): boolean => {
|
2020-11-30 20:00:31 +00:00
|
|
|
const { room } = this.state;
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room) {
|
|
|
|
return room?.ignored?.includes?.(message?.u?._id) ?? false;
|
|
|
|
}
|
|
|
|
return false;
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2020-11-30 20:00:31 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
onLoadMoreMessages = (loaderItem: TAnyMessageModel) => {
|
|
|
|
const { room } = this.state;
|
|
|
|
return RoomServices.getMoreMessages({
|
|
|
|
rid: room.rid,
|
2021-10-01 18:12:19 +00:00
|
|
|
tmid: this.tmid,
|
2022-03-29 18:53:27 +00:00
|
|
|
t: room.t as any,
|
2021-10-01 18:12:19 +00:00
|
|
|
loaderItem
|
|
|
|
});
|
2022-03-29 18:53:27 +00:00
|
|
|
};
|
2021-06-15 20:13:42 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
renderItem = (item: TAnyMessageModel, previousItem: TAnyMessageModel, highlightedMessage?: string) => {
|
2019-06-28 17:02:30 +00:00
|
|
|
const { room, lastOpen, canAutoTranslate } = this.state;
|
2022-04-28 18:44:40 +00:00
|
|
|
const { user, Message_GroupingPeriod, Message_TimeFormat, useRealName, baseUrl, Message_Read_Receipt_Enabled, theme } =
|
|
|
|
this.props;
|
2019-03-27 20:06:57 +00:00
|
|
|
let dateSeparator = null;
|
|
|
|
let showUnreadSeparator = false;
|
|
|
|
|
|
|
|
if (!previousItem) {
|
|
|
|
dateSeparator = item.ts;
|
|
|
|
showUnreadSeparator = moment(item.ts).isAfter(lastOpen);
|
|
|
|
} else {
|
2022-03-29 18:53:27 +00:00
|
|
|
showUnreadSeparator =
|
|
|
|
(lastOpen && moment(item.ts).isSameOrAfter(lastOpen) && moment(previousItem.ts).isBefore(lastOpen)) ?? false;
|
2019-03-27 20:06:57 +00:00
|
|
|
if (!moment(item.ts).isSame(previousItem.ts, 'day')) {
|
2019-04-08 12:35:28 +00:00
|
|
|
dateSeparator = item.ts;
|
2019-03-27 20:06:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-15 20:13:42 +00:00
|
|
|
let content = null;
|
2022-03-29 18:53:27 +00:00
|
|
|
if (item.t && MESSAGE_TYPE_ANY_LOAD.includes(item.t as MessageTypeLoad)) {
|
2021-10-01 18:12:19 +00:00
|
|
|
content = (
|
|
|
|
<LoadMore
|
|
|
|
load={() => this.onLoadMoreMessages(item)}
|
|
|
|
type={item.t}
|
2022-03-29 18:53:27 +00:00
|
|
|
runOnRender={item.t === MessageTypeLoad.MORE && !previousItem}
|
2021-10-01 18:12:19 +00:00
|
|
|
/>
|
|
|
|
);
|
2021-06-15 20:13:42 +00:00
|
|
|
} else {
|
|
|
|
content = (
|
|
|
|
<Message
|
|
|
|
item={item}
|
2022-03-29 18:53:27 +00:00
|
|
|
user={user as any}
|
2021-06-15 20:13:42 +00:00
|
|
|
rid={room.rid}
|
2022-03-29 18:53:27 +00:00
|
|
|
archived={'id' in room && room.archived}
|
|
|
|
broadcast={'id' in room && room.broadcast}
|
2021-06-15 20:13:42 +00:00
|
|
|
status={item.status}
|
|
|
|
isThreadRoom={!!this.tmid}
|
|
|
|
isIgnored={this.isIgnored(item)}
|
|
|
|
previousItem={previousItem}
|
|
|
|
fetchThreadName={this.getThreadName}
|
|
|
|
onReactionPress={this.onReactionPress}
|
|
|
|
onReactionLongPress={this.onReactionLongPress}
|
|
|
|
onLongPress={this.onMessageLongPress}
|
|
|
|
onEncryptedPress={this.onEncryptedPress}
|
|
|
|
onDiscussionPress={this.onDiscussionPress}
|
|
|
|
onThreadPress={this.onThreadPress}
|
2021-08-31 20:35:31 +00:00
|
|
|
onAnswerButtonPress={this.sendMessage}
|
2021-06-15 20:13:42 +00:00
|
|
|
showAttachment={this.showAttachment}
|
|
|
|
reactionInit={this.onReactionInit}
|
|
|
|
replyBroadcast={this.replyBroadcast}
|
|
|
|
errorActionsShow={this.errorActionsShow}
|
|
|
|
baseUrl={baseUrl}
|
|
|
|
Message_GroupingPeriod={Message_GroupingPeriod}
|
|
|
|
timeFormat={Message_TimeFormat}
|
|
|
|
useRealName={useRealName}
|
|
|
|
isReadReceiptEnabled={Message_Read_Receipt_Enabled}
|
2022-03-29 18:53:27 +00:00
|
|
|
autoTranslateRoom={canAutoTranslate && 'id' in room && room.autoTranslate}
|
|
|
|
autoTranslateLanguage={'id' in room ? room.autoTranslateLanguage : undefined}
|
2021-06-15 20:13:42 +00:00
|
|
|
navToRoomInfo={this.navToRoomInfo}
|
|
|
|
getCustomEmoji={this.getCustomEmoji}
|
|
|
|
callJitsi={this.callJitsi}
|
|
|
|
blockAction={this.blockAction}
|
|
|
|
threadBadgeColor={this.getBadgeColor(item?.id)}
|
|
|
|
toggleFollowThread={this.toggleFollowThread}
|
|
|
|
jumpToMessage={this.jumpToMessageByUrl}
|
|
|
|
highlighted={highlightedMessage === item.id}
|
2022-04-28 18:44:40 +00:00
|
|
|
theme={theme}
|
2021-06-15 20:13:42 +00:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
|
|
|
|
if (showUnreadSeparator || dateSeparator) {
|
|
|
|
return (
|
2019-09-24 20:26:56 +00:00
|
|
|
<>
|
2021-06-15 20:13:42 +00:00
|
|
|
{content}
|
2022-03-29 18:53:27 +00:00
|
|
|
<Separator ts={dateSeparator} unread={showUnreadSeparator} />
|
2019-09-24 20:26:56 +00:00
|
|
|
</>
|
2019-04-17 17:01:03 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-06-15 20:13:42 +00:00
|
|
|
return content;
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2017-08-07 00:34:35 +00:00
|
|
|
|
2017-08-10 16:16:32 +00:00
|
|
|
renderFooter = () => {
|
2021-10-01 18:12:19 +00:00
|
|
|
const { joined, room, selectedMessage, editing, replying, replyWithMention, readOnly, loading } = this.state;
|
|
|
|
const { navigation, theme, route } = this.props;
|
|
|
|
|
|
|
|
const usedCannedResponse = route?.params?.usedCannedResponse;
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2019-11-25 20:01:17 +00:00
|
|
|
if (!this.rid) {
|
|
|
|
return null;
|
|
|
|
}
|
2022-04-28 18:44:40 +00:00
|
|
|
if ('onHold' in room && room.onHold) {
|
|
|
|
return (
|
|
|
|
<View style={styles.joinRoomContainer} key='room-view-chat-on-hold' testID='room-view-chat-on-hold'>
|
|
|
|
<Text accessibilityLabel={I18n.t('Chat_is_on_hold')} style={[styles.previewMode, { color: themes[theme].titleText }]}>
|
|
|
|
{I18n.t('Chat_is_on_hold')}
|
|
|
|
</Text>
|
|
|
|
<Touch
|
|
|
|
onPress={this.resumeRoom}
|
|
|
|
style={[styles.joinRoomButton, { backgroundColor: themes[theme].actionTintColor }]}
|
|
|
|
enabled={!loading}
|
|
|
|
theme={theme}>
|
|
|
|
<Text style={[styles.joinRoomText, { color: themes[theme].buttonText }]} testID='room-view-chat-on-hold-button'>
|
|
|
|
{I18n.t('Resume')}
|
|
|
|
</Text>
|
|
|
|
</Touch>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2019-04-17 17:01:03 +00:00
|
|
|
if (!joined && !this.tmid) {
|
2018-09-19 14:18:32 +00:00
|
|
|
return (
|
2018-12-21 10:55:35 +00:00
|
|
|
<View style={styles.joinRoomContainer} key='room-view-join' testID='room-view-join'>
|
2021-10-01 18:12:19 +00:00
|
|
|
<Text
|
|
|
|
accessibilityLabel={I18n.t('You_are_in_preview_mode')}
|
|
|
|
style={[styles.previewMode, { color: themes[theme].titleText }]}>
|
|
|
|
{I18n.t('You_are_in_preview_mode')}
|
|
|
|
</Text>
|
2019-12-04 16:39:53 +00:00
|
|
|
<Touch
|
2018-09-19 14:18:32 +00:00
|
|
|
onPress={this.joinRoom}
|
2019-12-04 16:39:53 +00:00
|
|
|
style={[styles.joinRoomButton, { backgroundColor: themes[theme].actionTintColor }]}
|
2021-10-01 18:12:19 +00:00
|
|
|
enabled={!loading}
|
|
|
|
theme={theme}>
|
|
|
|
<Text style={[styles.joinRoomText, { color: themes[theme].buttonText }]} testID='room-view-join-button'>
|
|
|
|
{I18n.t(this.isOmnichannel ? 'Take_it' : 'Join')}
|
|
|
|
</Text>
|
2019-12-04 16:39:53 +00:00
|
|
|
</Touch>
|
2018-09-19 14:18:32 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2020-04-13 12:51:16 +00:00
|
|
|
if (readOnly) {
|
2018-01-17 16:42:30 +00:00
|
|
|
return (
|
2019-04-08 12:35:28 +00:00
|
|
|
<View style={styles.readOnly}>
|
2021-10-01 18:12:19 +00:00
|
|
|
<Text
|
|
|
|
style={[styles.previewMode, { color: themes[theme].titleText }]}
|
|
|
|
accessibilityLabel={I18n.t('This_room_is_read_only')}>
|
|
|
|
{I18n.t('This_room_is_read_only')}
|
|
|
|
</Text>
|
2018-01-17 16:42:30 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2022-03-29 18:53:27 +00:00
|
|
|
if ('id' in room && isBlocked(room)) {
|
2018-05-24 20:17:45 +00:00
|
|
|
return (
|
2019-04-08 12:35:28 +00:00
|
|
|
<View style={styles.readOnly}>
|
2019-12-04 16:39:53 +00:00
|
|
|
<Text style={[styles.previewMode, { color: themes[theme].titleText }]}>{I18n.t('This_room_is_blocked')}</Text>
|
2018-05-24 20:17:45 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2019-04-24 18:36:29 +00:00
|
|
|
return (
|
|
|
|
<MessageBox
|
|
|
|
ref={this.messagebox}
|
|
|
|
onSubmit={this.sendMessage}
|
|
|
|
rid={this.rid}
|
|
|
|
tmid={this.tmid}
|
|
|
|
roomType={room.t}
|
2019-10-28 20:51:46 +00:00
|
|
|
isFocused={navigation.isFocused}
|
2020-01-07 13:58:47 +00:00
|
|
|
theme={theme}
|
2019-09-16 20:26:32 +00:00
|
|
|
message={selectedMessage}
|
|
|
|
editing={editing}
|
|
|
|
editRequest={this.onEditRequest}
|
|
|
|
editCancel={this.onEditCancel}
|
|
|
|
replying={replying}
|
|
|
|
replyWithMention={replyWithMention}
|
|
|
|
replyCancel={this.onReplyCancel}
|
|
|
|
getCustomEmoji={this.getCustomEmoji}
|
2020-02-28 17:52:50 +00:00
|
|
|
navigation={navigation}
|
2021-10-01 18:12:19 +00:00
|
|
|
usedCannedResponse={usedCannedResponse}
|
2019-04-24 18:36:29 +00:00
|
|
|
/>
|
|
|
|
);
|
2017-09-25 13:15:28 +00:00
|
|
|
};
|
2017-08-09 20:08:50 +00:00
|
|
|
|
2019-04-17 17:01:03 +00:00
|
|
|
renderActions = () => {
|
2020-06-15 19:35:45 +00:00
|
|
|
const { room, readOnly } = this.state;
|
2020-12-17 16:55:19 +00:00
|
|
|
const { user } = this.props;
|
2022-03-29 18:53:27 +00:00
|
|
|
if (!('id' in room)) {
|
|
|
|
return null;
|
|
|
|
}
|
2018-07-18 20:34:59 +00:00
|
|
|
return (
|
2019-09-16 20:26:32 +00:00
|
|
|
<>
|
2020-06-15 19:35:45 +00:00
|
|
|
<MessageActions
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2021-10-01 18:12:19 +00:00
|
|
|
ref={ref => (this.messageActions = ref)}
|
2020-06-15 19:35:45 +00:00
|
|
|
tmid={this.tmid}
|
|
|
|
room={room}
|
|
|
|
user={user}
|
|
|
|
editInit={this.onEditInit}
|
|
|
|
replyInit={this.onReplyInit}
|
|
|
|
reactionInit={this.onReactionInit}
|
|
|
|
onReactionPress={this.onReactionPress}
|
|
|
|
isReadOnly={readOnly}
|
|
|
|
/>
|
2022-03-29 18:53:27 +00:00
|
|
|
{/* @ts-ignore TODO: missing interface on MessageErrorActions */}
|
2021-10-01 18:12:19 +00:00
|
|
|
<MessageErrorActions ref={ref => (this.messageErrorActions = ref)} tmid={this.tmid} />
|
2019-09-16 20:26:32 +00:00
|
|
|
</>
|
2018-07-18 20:34:59 +00:00
|
|
|
);
|
2021-10-01 18:12:19 +00:00
|
|
|
};
|
2018-07-18 20:34:59 +00:00
|
|
|
|
2017-08-04 00:34:37 +00:00
|
|
|
render() {
|
2021-10-01 18:12:19 +00:00
|
|
|
console.count(`${this.constructor.name}.render calls`);
|
|
|
|
const { room, reactionsModalVisible, selectedMessage, loading, reacting, showingBlockingLoader } = this.state;
|
2021-10-28 17:49:08 +00:00
|
|
|
const { user, baseUrl, theme, navigation, Hide_System_Messages, width, height, serverVersion } = this.props;
|
2022-03-29 18:53:27 +00:00
|
|
|
const { rid, t } = room;
|
|
|
|
let sysMes;
|
|
|
|
let bannerClosed;
|
|
|
|
let announcement;
|
|
|
|
let tunread;
|
|
|
|
let ignored;
|
|
|
|
if ('id' in room) {
|
|
|
|
({ sysMes, bannerClosed, announcement, tunread, ignored } = room);
|
|
|
|
}
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2017-08-04 00:34:37 +00:00
|
|
|
return (
|
2021-10-01 18:12:19 +00:00
|
|
|
<SafeAreaView style={{ backgroundColor: themes[theme].backgroundColor }} testID='room-view'>
|
2020-10-30 13:59:44 +00:00
|
|
|
<StatusBar />
|
2022-03-29 18:53:27 +00:00
|
|
|
<Banner title={I18n.t('Announcement')} text={announcement} bannerClosed={bannerClosed} closeBanner={this.closeBanner} />
|
2019-09-16 20:26:32 +00:00
|
|
|
<List
|
2022-03-29 18:53:27 +00:00
|
|
|
// @ts-ignore
|
2019-11-07 19:53:39 +00:00
|
|
|
ref={this.list}
|
2021-06-15 20:13:42 +00:00
|
|
|
listRef={this.flatList}
|
2019-09-16 20:26:32 +00:00
|
|
|
rid={rid}
|
|
|
|
t={t}
|
|
|
|
tmid={this.tmid}
|
2019-12-04 16:39:53 +00:00
|
|
|
theme={theme}
|
2022-03-29 18:53:27 +00:00
|
|
|
tunread={tunread}
|
|
|
|
ignored={ignored}
|
2019-09-16 20:26:32 +00:00
|
|
|
renderRow={this.renderItem}
|
|
|
|
loading={loading}
|
2020-02-17 19:06:18 +00:00
|
|
|
navigation={navigation}
|
2020-06-09 20:11:52 +00:00
|
|
|
hideSystemMessages={Array.isArray(sysMes) ? sysMes : Hide_System_Messages}
|
2022-03-29 18:53:27 +00:00
|
|
|
showMessageInMainThread={user.showMessageInMainThread ?? false}
|
2021-10-28 17:49:08 +00:00
|
|
|
serverVersion={serverVersion}
|
2019-09-16 20:26:32 +00:00
|
|
|
/>
|
2019-04-17 17:01:03 +00:00
|
|
|
{this.renderFooter()}
|
|
|
|
{this.renderActions()}
|
2019-09-16 20:26:32 +00:00
|
|
|
<ReactionPicker
|
|
|
|
show={reacting}
|
|
|
|
message={selectedMessage}
|
|
|
|
onEmojiSelected={this.onReactionPress}
|
|
|
|
reactionClose={this.onReactionClose}
|
2020-06-17 17:35:58 +00:00
|
|
|
width={width}
|
|
|
|
height={height}
|
2021-03-15 20:16:34 +00:00
|
|
|
theme={theme}
|
2019-09-16 20:26:32 +00:00
|
|
|
/>
|
2022-03-29 18:53:27 +00:00
|
|
|
<UploadProgress rid={rid} user={user} baseUrl={baseUrl} width={width} />
|
2019-05-20 20:43:50 +00:00
|
|
|
<ReactionsModal
|
|
|
|
message={selectedMessage}
|
|
|
|
isVisible={reactionsModalVisible}
|
|
|
|
user={user}
|
|
|
|
baseUrl={baseUrl}
|
2019-09-16 20:26:32 +00:00
|
|
|
onClose={this.onCloseReactionsModal}
|
|
|
|
getCustomEmoji={this.getCustomEmoji}
|
2019-05-20 20:43:50 +00:00
|
|
|
/>
|
2021-10-01 18:12:19 +00:00
|
|
|
<JoinCode ref={this.joinCode} onJoin={this.onJoin} rid={rid} t={t} theme={theme} />
|
2021-06-15 20:13:42 +00:00
|
|
|
<Loading visible={showingBlockingLoader} />
|
2018-08-01 19:35:06 +00:00
|
|
|
</SafeAreaView>
|
2017-08-04 00:34:37 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2019-08-07 13:51:34 +00:00
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
const mapStateToProps = (state: IApplicationState) => ({
|
2020-02-11 14:09:14 +00:00
|
|
|
user: getUserSelector(state),
|
2020-06-15 14:00:46 +00:00
|
|
|
isMasterDetail: state.app.isMasterDetail,
|
2019-08-07 13:51:34 +00:00
|
|
|
appState: state.app.ready && state.app.foreground ? 'foreground' : 'background',
|
2022-03-29 18:53:27 +00:00
|
|
|
useRealName: state.settings.UI_Use_Real_Name as boolean,
|
2019-08-07 13:51:34 +00:00
|
|
|
isAuthenticated: state.login.isAuthenticated,
|
2022-03-29 18:53:27 +00:00
|
|
|
Message_GroupingPeriod: state.settings.Message_GroupingPeriod as number,
|
|
|
|
Message_TimeFormat: state.settings.Message_TimeFormat as string,
|
2019-09-16 20:26:32 +00:00
|
|
|
customEmojis: state.customEmojis,
|
2020-02-11 14:09:14 +00:00
|
|
|
baseUrl: state.server.server,
|
2021-10-28 17:49:08 +00:00
|
|
|
serverVersion: state.server.version,
|
2022-03-29 18:53:27 +00:00
|
|
|
Message_Read_Receipt_Enabled: state.settings.Message_Read_Receipt_Enabled as boolean,
|
|
|
|
Hide_System_Messages: state.settings.Hide_System_Messages as string[]
|
2019-08-07 13:51:34 +00:00
|
|
|
});
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
export default connect(mapStateToProps)(withDimensions(withTheme(withSafeAreaInsets(RoomView))));
|