mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-15485: In-channel system behaviour for at-mentions and slash commands for group-constrained channels. (#10855)
* MM-15108: Prevent non-group-members from being added to group-constrained channels. * MM-15485: Updates ephemeral message when non-group member is invited to group-constrained channel. * MM-15485: Prevent group-permitted members from being removed from group-constrained channels. Show custom ephemeral when attempting /kick or /remove.
This commit is contained in:
committed by
George Goldberg
parent
6d2fa0f3d2
commit
8d8a4d8614
@@ -206,6 +206,10 @@ func (o *Channel) AddProp(key string, value interface{}) {
|
||||
o.Props[key] = value
|
||||
}
|
||||
|
||||
func (o *Channel) IsGroupConstrained() bool {
|
||||
return o.GroupConstrained != nil && *o.GroupConstrained
|
||||
}
|
||||
|
||||
func GetDMNameFromIds(userId1, userId2 string) string {
|
||||
if userId1 > userId2 {
|
||||
return userId2 + "__" + userId1
|
||||
|
||||
@@ -280,6 +280,10 @@ func (t *Team) Patch(patch *TeamPatch) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Team) IsGroupConstrained() bool {
|
||||
return t.GroupConstrained != nil && *t.GroupConstrained
|
||||
}
|
||||
|
||||
func (t *TeamPatch) ToJson() string {
|
||||
b, err := json.Marshal(t)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user