Check team count if currentTeamId is set (#4781) (#4784)

(cherry picked from commit ef583d4fb6)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
Mattermost Build
2020-09-08 18:38:59 -04:00
committed by GitHub
parent ff1f0a741d
commit 937209c6d7

View File

@@ -92,7 +92,7 @@ class ShareViewController: SLComposeServiceViewController {
func loadData() {
if sessionToken == nil || serverURL == nil {
showErrorMessage(title: "", message: "Authentication required: Please first login using the app.", VC: self)
} else if store.getCurrentTeamId() == "" {
} else if store.getCurrentTeamId() == "" || store.getMyTeams().count == 0 {
showErrorMessage(title: "", message: "You must belong to a team before you can share files.", VC: self)
} else {
extractDataFromContext()