Commit graph

1266 commits

Author SHA1 Message Date
Elias Nahum
24ee8cc98e
Bump app build number to 456 (#7102) 2023-02-08 17:07:08 +02:00
Mattermost Build
c27e1116cc
Android fix (#7099) (#7101)
* Fix android notifications permission

* fix unsigned android build

(cherry picked from commit cb717aba0c)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-08 16:57:01 +02:00
Mattermost Build
2aaa366558
Replace package and imports for Kotlin files (#7090) (#7092)
(cherry picked from commit f37a9fbabb)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-07 11:36:54 +02:00
Mattermost Build
e72a142974
Fix (#7082) (#7083)
(cherry picked from commit fab5665773)

Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
2023-02-03 15:26:48 +05:30
Jason Frerich
7165830fe0
[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:47:22 +02:00
Mattermost Build
ce5d049a55
Update RN and deps to fix ANR issues (#7078) (#7079)
(cherry picked from commit 82f0b014f4)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-02 14:44:09 +02:00
Mattermost Build
8d9fab9b53
Use timeout defaults for iOS Share Extension and Notification Service (#7051) (#7074)
* Use timeout defaults for iOS Share Extension and Notification Service

* more logs

* Add more logs, handle errors and safe parse the filename

(cherry picked from commit 5aaff10664)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-01 21:28:53 +02:00
Mattermost Build
70cf8c5593
Only fetchMissingDirectChannelsInfo when no display name is set (#7060) (#7069)
(cherry picked from commit c9b56e55c4)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-31 22:10:24 +02:00
Mattermost Build
c9773d031d
Request permissions for Android push notifications and refactor code to use network client (#7059) (#7068)
(cherry picked from commit 265b8b2193)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-31 21:41:09 +02:00
Mattermost Build
d75b854828
Fix add to default category code for dms and gms (#7057) (#7064)
(cherry picked from commit aa6c1ff058)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-01-31 16:40:46 +01:00
Mattermost Build
f1a06396c6
Filter unused preferences (#7015) (#7061)
* small preferences refactor

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

* Feedback review

(cherry picked from commit 64a59aad55)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-30 21:12:26 +02:00
Mattermost Build
d1cbfe6659
Fix the animation that occurs in login flow (#7054) (#7056)
(cherry picked from commit 37bc95cf1e)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-30 12:16:02 +02:00
Mattermost Build
ff18feeac4
Bump app build number to 454 (#7042) (#7049)
Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit b2fb4d7ec2)

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2023-01-27 22:26:46 +02:00
Mattermost Build
05984b7202
Fixes crashes and errors in iOS Share Extension and Notification Service (#7032) (#7048)
* Fix erros & crashes in iOS share extension

* Fix erros & crashes in iOS notification service

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit ca14631487)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 22:20:33 +02:00
Mattermost Build
511525c9ed
disable top domain level verification (#7045) (#7046)
(cherry picked from commit a535728d5c)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 22:13:18 +02:00
Mattermost Build
055c9109ef
Fix CI to include postinstall script of react-native-webrtc (#7043) (#7044)
(cherry picked from commit 64ee37dfd4)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 20:55:49 +02:00
Mattermost Build
d484a4ff45
catch exceptions in Android Database helper (#7027) (#7041)
(cherry picked from commit 7ed2e73a91)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 18:58:42 +02:00
Mattermost Build
e6a1cbb2aa
Allow user to mark post as unread that was posted by a webhook (#7016) (#7039)
* Allow user to mark post as unread that was posted by a webhook

* feedback review

(cherry picked from commit 34aef73ac1)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 18:58:15 +02:00
Mattermost Build
c77f1dbd6d
Do not access record children directly to avoid crashes if the child is not present in the db (#7028) (#7038)
(cherry picked from commit 50b845452e)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 18:11:18 +02:00
Mattermost Build
5f349e378e
Fix crash when dismissing notification on android (#7029) (#7037)
* Fix crash when dismissing notification on android

* ensure notification channels are created

(cherry picked from commit 9bae53b4ad)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-01-27 18:11:05 +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
dependabot[bot]
27de9d330d
Bump activesupport from 6.1.7 to 6.1.7.1 in /ios (#6996)
Bumps [activesupport](https://github.com/rails/rails) from 6.1.7 to 6.1.7.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.4.1/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v6.1.7...v6.1.7.1)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-26 20:34:09 +02: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
Amy Blais
8be99d2c70
Update NOTICE.txt (#7026) 2023-01-26 20:23:45 +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
Amy Blais
1a5e4c2d66
Update ISSUE_TEMPLATE.md (#7006) 2023-01-24 10:23:06 -05:00
exbu
0620835085 Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
Tom De Moor
c8a57b6f81 Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
Matthew Williams
4ab917c6aa Translated using Weblate (English (Australia))
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/en_AU/
2023-01-24 11:02:34 +02:00
Kaya Zeren
6b37051606 Translated using Weblate (Turkish)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/tr/
2023-01-24 11:02:34 +02:00
Kaya Zeren
73ad713823 Translated using Weblate (Turkish)
Currently translated at 96.3% (907 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/tr/
2023-01-24 11:02:34 +02:00
Tom De Moor
5040a445b1 Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
exbu
3ff26d687e Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
exbu
6dd17dba0b Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
Tom De Moor
07f4f11f81 Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
exbu
0250a7bb66 Translated using Weblate (Dutch)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/nl/
2023-01-24 11:02:34 +02:00
Roman Ilnytskyi
3d7920e828 Translated using Weblate (Ukrainian)
Currently translated at 28.3% (267 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/uk/
2023-01-24 11:02:34 +02:00
Roman Ilnytskyi
2d3673fe32 Translated using Weblate (Ukrainian)
Currently translated at 27.6% (260 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/uk/
2023-01-24 11:02:34 +02:00
MArtin Johnson
ec02df5d82 Translated using Weblate (Swedish)
Currently translated at 100.0% (941 of 941 strings)

Translation: mattermost-languages-shipped/mattermost-mobile-v2
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-mobile-v2/sv/
2023-01-24 11:02:34 +02: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