From 937209c6d70feddbc5a2126700a558f467d7475f Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Tue, 8 Sep 2020 18:38:59 -0400 Subject: [PATCH] Check team count if currentTeamId is set (#4781) (#4784) (cherry picked from commit ef583d4fb6be6a0a37c85b03569e67e9f76f4ad6) Co-authored-by: Miguel Alatzar --- ios/MattermostShare/ShareViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/MattermostShare/ShareViewController.swift b/ios/MattermostShare/ShareViewController.swift index 20464c539..031ba63c3 100644 --- a/ios/MattermostShare/ShareViewController.swift +++ b/ios/MattermostShare/ShareViewController.swift @@ -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()