Commit Graph

883 Commits

Author SHA1 Message Date
Daniel Espino García
f23960dea3 Fix upload permissions and centralize download permissions (#7109) 2023-02-14 22:55:02 +02:00
Christopher Poile
4cb20a4bec MM-49065 - Calls: Implement glare free negotiation (#7111)
* glare-free negotiation

* update to latest with fix

* remove unneeded sessionConstraints

* update to latest react-native-webrtc
2023-02-13 11:03:49 -05:00
Christopher Poile
35c98e673a MM-50415 - Fix addIceCandidate error due to potential race (#7104) 2023-02-09 10:36:22 -05:00
Joseph Baylon
21ae37353e Add testID for radio item option 2023-02-09 09:40:32 +01:00
Christopher Poile
03fe46f229 MM-48605: Calls - Fix for start time in join call banner is incorrect (#7095)
* "fix" the wrong start time

* cleanup unused field
2023-02-08 09:25:41 -05:00
Shivashis Padhi
7158de8d5e Merge pull request #7086 from mattermost/MM-49868_revert_mentions_of_free_oauth
MM-49868: Remove mentions of Free OAuth in OpenID-Connect section
2023-02-07 20:23:53 +05:30
Claudio Costa
ab50164d34 [MM-49996] Add /call recording slash command (#7062)
* Add  slash command

* Fix alert

* Implement alert for recording errors

* Default locked
2023-02-06 21:14:22 -06:00
Shivashis Padhi
08b1dc4ea8 Remove mention of FreeOAuth 2023-02-06 16:02:47 +05:30
Daniel Espino García
980c31f40f Remove watermelondb limitation on updating an already updated model (#7067)
* Remove watermelondb limitation on updating an already updated model

* Add logic to handle different prepare states and improve logging

* fix tests

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-03 17:11:57 +02:00
Anurag Shivarathri
fab5665773 Fix (#7082) 2023-02-03 15:08:51 +05:30
Jason Frerich
218f98e3e0 [Gekidou - MM-47653] Implement Manage Members Screen (#6771)
* 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>
2023-02-03 10:42:12 +02:00
Elias Nahum
82f0b014f4 Update RN and deps to fix ANR issues (#7078) 2023-02-02 14:27:42 +02:00
Joseph Baylon
70bdfcf8fd Detox Maintenance: Update deps, fix import, fix failing tests -- iOS only (#7070)
* Detox Maintenance: Update deps, fix import, fix failing tests

* Revert message reply step 3

* Try fresh install per test file
2023-02-01 08:32:57 -08:00
Elias Nahum
c9b56e55c4 Only fetchMissingDirectChannelsInfo when no display name is set (#7060) 2023-01-31 22:01:57 +02:00
Elias Nahum
265b8b2193 Request permissions for Android push notifications and refactor code to use network client (#7059) 2023-01-31 21:33:35 +02:00
Daniel Espino García
aa6c1ff058 Fix add to default category code for dms and gms (#7057) 2023-01-31 16:38:25 +01:00
Elias Nahum
64a59aad55 Filter unused preferences (#7015)
* small preferences refactor

* filter unused preferences and fix removal of preferences in the db

* Feedback review
2023-01-30 21:00:19 +02:00
Elias Nahum
37bc95cf1e Fix the animation that occurs in login flow (#7054) 2023-01-30 11:58:44 +02:00
Javier Aguirre
7631d169c9 [MM-49006] Handle Plugin related events (#7011)
* Handle Plugin related events

* Remove old ws events

* Adding the missing plugin events
2023-01-30 10:55:27 +01:00
Daniel Espino García
a9dc4ec90f Use more verbose message on archive and don't make help link lowercase (#6952)
* Use more verbose message on archive and don't make help link lowercase

* Fix lint
2023-01-27 18:26:13 +01:00
Elias Nahum
34aef73ac1 Allow user to mark post as unread that was posted by a webhook (#7016)
* Allow user to mark post as unread that was posted by a webhook

* feedback review
2023-01-27 18:48:17 +02:00
Elias Nahum
50b845452e Do not access record children directly to avoid crashes if the child is not present in the db (#7028) 2023-01-27 17:57:38 +02:00
Daniel Espino García
78944554a8 Fix pdf upload and pdf download from search results (#6984) 2023-01-27 09:10:05 +02:00
Christopher Poile
a44074247e MM-46312 - Calls: Replace simple-peer with RTCPeer; use up-to-date upstream react-native-webrtc (#6898)
* move to latest react-native-webrtc release

* make this version of rtcpeer as close as possible to Call's version

* remove need for destroyCb

* upgrade webrtc

* continue merge

* upgrade webrtc

* new linting rules
2023-01-26 14:06:05 -05:00
Elias Nahum
c1fbaffd3e Support for Android Tablets & Foldable (#7025)
* Add Support for Android tablets & foldables

* add tablet and book posture

* Regenerate disposed observable on WindowInfoTracker
2023-01-26 20:31:18 +02:00
Elias Nahum
983d0aab66 Fix matchDeepLink when server is on a subpath (#7010)
* Fixes matchDeepLink when server is in a subpath

* Fix matchDeepLink when serverUrl is in a subpath
2023-01-25 15:04:05 +02:00
Anurag Shivarathri
5160cf9212 [MM-49652] Setting to enable/disable CRT (#6999)
* Added settings

* Moved obj to variable

* Merge fix
2023-01-25 18:15:37 +05:30
Elias Nahum
15e75ac24b iPad: enable rotation in all directions (#7007)
* iPad: enable rotation in all directions

* feedback review
2023-01-24 21:48:37 +02:00
Christopher Poile
24bb5f9b25 [MM-49927] Calls: Fix recording message (#7012) 2023-01-24 12:50:06 -05:00
Elias Nahum
7aa5bd0611 Update Dependencies and bug fixes (#7000)
* update dependencies

* update dependencies

* feedback review

* update @mattermost/react-native-turbo-mailer
2023-01-24 09:14:23 +02:00
Elias Nahum
4aaf08b12a Remove mock locations from jailbrake detection (#7005) 2023-01-24 10:42:52 +04:00
Julian Mondragón
ba33f610c1 Merge pull request #6877 from julmondragon/MM-42835
MM-42835_Invite People - add email+user invites
2023-01-23 16:26:12 -05:00
Julian Mondragon
c16145713a MM-42835_Invite People - add email+user invites 2023-01-23 14:57:16 -05:00
Julian Mondragon
50200a0ce2 MM-42835_Invite People - add email+user invites 2023-01-23 14:40:33 -05:00
Christopher Poile
9a89259e96 MM-48836 - Calls: handle slash commands (#6980) 2023-01-23 20:08:33 +02:00
Julian Mondragon
557804ef45 MM-42835_Invite People - add email+user invites 2023-01-23 12:59:57 -05:00
Christopher Poile
e140a12b6c MM-46999 - Calls: Start call in speaker mode (#6979) 2023-01-23 09:39:09 -05:00
Christopher Poile
6c9c025d25 MM-49746 - Calls: Show call thread title in root calls post (#6992)
* add thread title to calls custom posts

* PR comments
2023-01-23 09:38:07 -05:00
Anurag Shivarathri
eb46a6aeff [MM-47548 Gekidou] Data Retention Implementation (#6732)
* Fetch & Save granular data retention policies through REST

* Init Data cleanup

* Run the clean up

* Deleting posts in patches and running across other servers

* fetch on graphql & refactor

* Feedback changes

* Added try catch for deletePosts function

* Feedback changes

* Changed to 'for of' loop

* Misc

* app/actions

* Date cutoff fox

* Prevent showing loading bar when request fails

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-01-21 16:04:19 +05:30
Julian Mondragon
3e4851e6fa MM-42835_Invite People - add email+user invites 2023-01-20 12:44:31 -05:00
Avinash Lingaloo
82c5244589 MM-44652 - Fix long team name (#6943)
* fix long team name

* minor code refactor

* adds a comment to explain the 85%

* update snapshots
2023-01-20 21:17:01 +04:00
Julian Mondragon
29a66bbc19 MM-42835_Invite People - add email+user invites 2023-01-19 17:18:51 -05:00
Daniel Espino García
9c19e4d04a Remove uneeded database migrations (#6985) 2023-01-19 16:56:30 +01:00
Jason Frerich
88afe7db91 [MM-48282] When user selects open in channel, dismiss the bottom sheet (#6956) 2023-01-18 16:26:05 -06:00
Daniel Espino García
0222504cc9 Fix e2e login error (#6978)
* Fix e2e login error

* fix lint
2023-01-17 14:02:39 +01:00
Julian Mondragon
a8da27d5e9 MM-42835_Invite People - add email+user invites 2023-01-16 19:00:27 -05:00
Julian Mondragon
0b86c5129c MM-42835_Invite People - add email+user invites 2023-01-16 13:28:03 -05:00
Julian Mondragon
5816406040 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2023-01-15 16:40:21 -05:00
Julian Mondragon
cfbacd4aaf MM-42835_Invite People - add email+user invites 2023-01-15 16:37:52 -05:00
Elias Nahum
49fc180982 Fix the caret position when using the search phrase modifier (#6972) 2023-01-13 21:06:16 +02:00