Admittedly, their licensing scheme is a bit strange, but it's very clearly F/OSS. Even in the most restrictive case, it's still the AGPL with additional exemptions.
I'm not sure that the portion under AGPL actually has exemptions. They say in their LICENSE.txt file:
We promise that we will not enforce the copyleft provisions
in AGPL v3.0 against you if your application (a) does not
link to the Mattermost Platform directly, but exclusively
uses the Mattermost Admin Tools and Configuration Files, and
(b) you have not modified, added to or adapted the source code
of Mattermost in a way that results in the creation of a “modified
version” or “work based on” Mattermost as these terms are defined
in the AGPL v3.0 license.
Note that the two conditions necessary to receive the exemption are connected by "and", not "or". The second condition is that you not create a modified work or a work based upon the program as defined in AGPL v3.0.
But by the terms of AGPL itself its copyleft provisions are only applicable to modified versions, so it doesn't appear that there are any circumstances where Mattermost's exemption will actually exempt you from anything.