* Handle biometric authentication
* jailbreak/root detection and biometric small fixes
* remove server from initializeSecurityManager and fix loginEntry
* Add screen capture prevention and other small fixes
* added unit tests to SecurityManager
* added shielded nativeID to protect views
* use MobilePreventScreenCapture instead of MobileAllowScreenshots in config type definition
* Apply Swizzle for screen capture on iOS
* Apply patch to bottom sheet to prevent screen captures
* fix ios sendReply
* Fix SDWebImage swizzle to use the correct session
* Fix potential crash on Android when using hardware keyboard
* rename patch for network library to remove warning
* add temp emm reference
* fix initializeSecurityManager tests
* fix translations
* use siteName for jailbreak detection when connecting to a new server
* fix i18n typo
* do not query the entire config from the db only the required fields
* migrate manage_apps to use defineMessages
* use TestHelper.wait in tests
* use defineMessages for security manager
* fix missing else statement for gm_to_channel
* created a TestHelper function to mockQuery and replace as jest.Mock with jest.mocked
* fix unit tests
* fix unit tests (again) and include setting the test environment to UTC
* Fix keyboard disappearing on iOS
* update react-native-emm
* refactor: Use fetchCustomAttributes for user profile custom attributes
feat: Add optional filter for empty custom attributes
simplify and fix types
add again the request time, take into account errors
test: Update fetchCustomAttributes tests for filterEmpty parameter
feat: Add sort_order to CustomAttribute in fetchCustomAttributes
feat: Add optional sort_order to CustomAttribute type
fix: Add type definition for sort_order in CustomProfileField attrs
feat: Add sorting function for custom profile attributes
docs: Add JSDoc comment explaining sortCustomProfileAttributes function
refactor: Improve sortCustomProfileAttributes with nullish coalescing and localeCompare
add order to custom profile attributes
* remove blank line
* add ordering to edit_profile screen
* keep types together
* address code review
* Add new team picker for search
* try fix result header
* fix style
* add test for team picker
* add some tests
* add tests on team list and team list item
* hide All Teams search behind FF
* use style variable for separator
* ALL TEAMS does not have a search history
* Update app/components/team_list/index.test.tsx
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* move ALL_TEAMS_ID to a constant file
* memoize the construction of team list to prevent useless allocation
* combine pushes
* move style to stylesheet
* revert changes to Package.resolved
* improve team list index tests
* add test to ensure team picker does not show for just one team
* add test to ensure the file icon filter only shows when i'm on the file tab
* improve jsx readability by making the if test positive
* add test to make sure team picket does not show if there's only one team
* test: remove snapshot and add expect that separator exists in index 0 but index 1 (#8474)
* Trigger Build
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
* Network metrics
* update network-client ref
* fix unit tests
* missing catch error parsing
* Replace API's to fetch all teams and channels for a user
Update groupLabel to use a type definition
Include effective Latency and Average Speed in the metrics
Include parallel and sequential request counts
* update network library and fix tests
* feat(MM-61865): send network request telemetry data to the server (#8436)
* feat(MM-61865): send network info telemetry data
* unit testing
* fix latency vs effectiveLatency
* cleanup test
* fix failing tests
* fix spelling error
* fix failing test
* more cleanup
* fix: improve parallel requests calculation (#8439)
* fix: improve parallel requests calculation
* fix test issue
* multiple parallelGroups testing
* calculateAverageSpeedWithCategories test
* categorizedRequests in it's own describe
* clean up duplicate tests
* check for when groupLabel is non-existent
* a case when groupLabel is non-existent
* more testing with effective latency.
* resolveAndFlattenModels with a capital F
* add try..catch within resolveAndFlattenModels
* update groupLabel to fix failing lint
* fix linting issue due to unknown group label
* forgot to push changes
* fix the indentation problem again
* add env var option for COLLECT_NETWORK_METRICS
---------
Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Add test notification menu
* Reduce the minimum version for testing purposes
* Address feedback
* Add missing strings
* Address feedback
* Fix snapshots
* Bump version limit and use correct link
* Fix tests
* Fix URL issues
* notification ringing, settings screen, native code patch, ringing mp3s
* i18n
* play preview on first press
* prevent playing from background (only affects Android) to match iOS beh
* stop ringing/vibration on entering background
* ring when coming back from background and new incoming call is present
* no push notification sound when it's a call; improve ringing
* move sounds to asset folder; copy on postinstall for android bundling
* make Ringtone type a string enum
* make Android ring async + await ring and stop; changes from PR comments
* missing fields after merge
* release lock on an exception
* cancel sample ringing when turning notifications off
* copy sound files for android build
* typo
* update snapshots
* testing if the problem is copying the mp3 files
* fix android mp3 assets when building for non-release
* add sounds to .gitignore
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* captions on videos from posts and searches
* add the patch for react-native-video which fixes subtitle downloading
* improve spacing
* fix patch file
* upgrade compass-icons; use cc icon
* revert patch overwrite
* fix patch
* use useMemo
* fix hitslops on pressables
* use new Caption format; refactor for clarity
* simplify tracks creation and use
* MM-53107 Add limit to Markdown nodes
* Update commonmark to published version
* Rename field to camel case for consistency
* Update Markdown tests for removed children
* [MM-53249] Allow server to hide or customize the Forgot Password link
* Update app/screens/login/form.tsx
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Fix issue for older servers
* Sort imports
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Only call app entry on websocket reconnect
* Handle notification on its own entry and run app entry on websocket initialization
* Fix notification entry issues
* Fix login entry and add retry on entry failure
* feedback review
* Put back handleEntryAfterLoadNavigation before the batching
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* move user_list to component
* start the modal from create_direct_message
* initial commit
* Add managing options to user profile
* s/showManage/showManageMode/
* simplify
* use helper functions
* add dependency
* fix togglling manage/done button
* remove close button in navbar
* remove close button. The only exit from this screen is the back button
* utilize LeaveChannelLabel component actions
* nit
* nit
* slight refactor
* return earlier if not showManageMode
* use defineMessages
* don't modify leave channel component
* add manage_members_label component
* rename variables to imply manage actions
* remove user from channel on server and locally in channel membership
* prevent managing yourself. In V1, this is done by not allowing you to
select yourself for channel removal
* remove useReducer
* - fix typography
- fix icon size
- don't allow tapping on yourself in manage mode
* sort props
* sort props
* sort props
* - combine try blocks
- use getServerDatabaseAndOperator function to get the operator
* fetchChannelStats after removing users from a channel
* currently, the UI does not provide a need to remove multiple members
from a channel, only one member. modify the function to only accept and
remove one user
* no need to pass the entire channel object. only need the channelId which
is already passed into the screen
* do not pass the entire user model, only the userid and if user canManage
(is sysadmin or channel admin)
* move members constants to its own file and out of general.ts file
* pass channel displayName instead of the entire channel object
* not need to store the user as it is already in the store from the
fetchProfilesInChannel call
* implement device emitter to notify the parent to remove to the user from
the user list
* rename constant in reveal removing a member from a channel. Might need for another team removal later.
* add snackbar after user is removed
* remove unnessary filter
* remove paging. Server response is not paginated
deconstruct intl
* create EMPTY const
* simplify getProfiles function
* move constants to top of file
* add function to remove the user from the server
* clean up dependencies
* remove @app/ prefix from imports
* add comment describing reason for switch / case
* rename varaible to be more intention revealing
* calculate isDefaultChannel and pass in as prop so don't need to
query for each user
* if user cannot manage, do not show the manage nav button
* move options const into function that uses it
* have the caller of handeRemoveMemberFromChannel fetch channel stats, not
the action
* nit formatting
* s/canManage/canManageMembers/
* use existing observeCanManageChannelMembers function
function only requires channel id
* move userInfo and manage user options to their own components
* calculate bottom sheet snap points when in manage mode
* implement correct permissions for managing users. For now, only channel
admins can manage users (including deleting members)
* working on section creation
* use map instead of arrays
* - handle user profile sections differently when in members are provided (manage mode)
- emit event when user role is changed
- modify the channelMembers in manage members modal after changing
user role
* remove commented code
* deconstruct options
* sort dependencies and add loading dependency
* - when removing a user, remove them from channelMembers state also
- don't add empty sections to the user list results
* user profile coming from ManageChannelMembers is UserProfile joined with
their ChannelMembership. Can now check for scheme_admin to see if the
user is a channel admin
* deconstruct locale from intl and remove intl const
* Add SearchUserOptions type to provide type checking when creating options for searchProfile
action and searchUsers client api
* correct comment
* deconstruct MANAGE_OPTIONS
* Remove unused event constant
* nits
* Push header title in to the UserProfileTitle component
* Put constants back so Diff of file is smaller
* Combine switch statements
Remove isOptionItem. These are always action items
* Wrap onAction in a usecallback
* Add help comments
* Add i18n to section titles
* Create RenderItemType for renderItem callback
* update testID
update snapshots
* CanManageMembers is deterimined by observeCanManageChannelMembers
* Add members chanenl option
* Update after merge
* Sort in order of options shown
* nit refactor
* Modify client getProfilesInChannel allow passing more options than sort.
- sort the profiles by admin
- do not show deactivated users in the manage members modal
* Profiles are now sorted by admin. We can maintain the alphabetical sort
also by iterating over the profiles instead of members which are not alphabetical
* Type the get users Api object
* Add type.
Active option is a boolean, not a string
* only initialize if needed. Moved inside the check for members
* Create type for Manage Member Options
* Remove one liners and call directly in the switch block
* Keys to the map do not need to be translated. Only translate the title
Place the Admins section always on top
* Add removeFromChannel as a dependency
* Remove manageMode option from the title component
- add imageSize prop
- add headerText prop
* Do not show deactivated users in search
* When users are showing and not in manage mode, allow the user to tap and
open the profile for the user (in non-manage mode)
* Add fetchOnly to getMemberInChannel function
Add fetchOnly to updateChannelMembersSchemeRoles function
Remove getMemberInChannel from handleUserChangeRole in manage_channel_members because it is already called via updateChannelMembersSchemeRoles
* Remove todo from comment
* Don't use state for defining action text, icon, and isDestructive. just
set them based on the prop value manageOption
* Added correct permission check for can user manage member roles
* Add can manage member roles prop
* Calculate snap points based on manageMemberRoles prop
* Calculate snap point based on if user can remove other users
* Do not show options if you cannot remove or manage members
* Fix post merge issues
* No need to batch because only manipulating a single model
* Remove comment
* Rename variable
* Split and sort props into multiple lines for readability
* Nit
* Make dependency more specific
* Remove comment. Doing this requires writing a custom search function in
the app that would need to guarantee the same results as a server call
* Add logError to functions with catch
* Add ticket reference
* Remove await from functions that are updating the database. Components
that observe models these modify will get the update based from the
observable change.
* Keep track of which section is first so that the tutorial highlight
selects the first user profile of the first section
* Add a second user that creates a new section for testing tutorial
* Remove unused prop
* Update snapshot to include second user
* Use getServerDatabaseAndOperator
* remove testID change. Added a ticket to fix later
* Revert tests to only one user to test if previous tests worked
* Add new test that has 2 users
* Add ticket context as comment
* Add channelId as dependency
* Use useCallback for updateChannelMemberSchemeRole
* Remove async
* mounted.current should only be used in an effect that executes on the
first render
when user has permission to manage members changed, there is no need to
get the profiles again
* Add await for function
* Always reset loading to false after getting profiles
* use !text instead of const value using Boolean()
* add dependency
* Add manage members ids back
* When fetching users for the channel, always store them in the database.
Otherwise tapping a user might not be in the database and tapping on
them will cause a crash
* Fetch the user profile from the server when opening the user profile
* Checking management permissions should be based on the current user, not
the user of the profile being opened
---------
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
We have changed how priority gets saved in the server, so now instead of
post.props we are using post.metadata.priority.
This commit adds the relevant changes for posts' priority to work in the
mobile app.
* Add terms of service
* Add i18n
* Fix test
* Address feedback
* Address ux feedback
* Update texts
* Avoid Review to show on top of ToS
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
* Fix crash on Android when session expired notification is presented
* react-native-notification patch for schedule fix on android and open local notification on iOS
* Fix android scheduled session notification crash
* patch react-native-navigation to support blur/focus AppState on Android
* remove schedule session expired notification from login entry point
* schedule session expired notification actions
* add session manager
* Handle open session expired notification