diff --git a/api/command.go b/api/command.go index bebe6629cb..451de2c33a 100644 --- a/api/command.go +++ b/api/command.go @@ -111,7 +111,7 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) { if provider != nil { response := provider.DoCommand(c, channelId, message) - handleResponse(c, w, response, channelId, provider.GetCommand(c)) + handleResponse(c, w, response, channelId, provider.GetCommand(c), true) return } else { chanChan := Srv.Store.Channel().Get(channelId) @@ -193,7 +193,7 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) { if response == nil { c.Err = model.NewLocAppError("command", "api.command.execute_command.failed_empty.app_error", map[string]interface{}{"Trigger": trigger}, "") } else { - handleResponse(c, w, response, channelId, cmd) + handleResponse(c, w, response, channelId, cmd, false) } } else { body, _ := ioutil.ReadAll(resp.Body) @@ -211,11 +211,14 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) { c.Err = model.NewLocAppError("command", "api.command.execute_command.not_found.app_error", map[string]interface{}{"Trigger": trigger}, "") } -func handleResponse(c *Context, w http.ResponseWriter, response *model.CommandResponse, channelId string, cmd *model.Command) { +func handleResponse(c *Context, w http.ResponseWriter, response *model.CommandResponse, channelId string, cmd *model.Command, builtIn bool) { post := &model.Post{} post.ChannelId = channelId - post.AddProp("from_webhook", "true") + + if !builtIn { + post.AddProp("from_webhook", "true") + } if utils.Cfg.ServiceSettings.EnablePostUsernameOverride { if len(cmd.Username) != 0 { diff --git a/api/file.go b/api/file.go index 5c983ea555..0011afd5b8 100644 --- a/api/file.go +++ b/api/file.go @@ -52,7 +52,7 @@ const ( RotatedCCWMirrored = 7 RotatedCW = 8 - MaxImageSize = 4096 * 2160 // 4k resolution + MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image ) var fileInfoCache *utils.Cache = utils.NewLru(1000) diff --git a/api/post.go b/api/post.go index 9d3ba5ab10..e6560a8e88 100644 --- a/api/post.go +++ b/api/post.go @@ -604,12 +604,12 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel * year := fmt.Sprintf("%d", tm.Year()) zone, _ := tm.Zone() - subjectPage := NewServerTemplatePage("post_subject", c.Locale) + subjectPage := NewServerTemplatePage("post_subject", profileMap[id].Locale) subjectPage.Props["Subject"] = userLocale("api.templates.post_subject", map[string]interface{}{"SubjectText": subjectText, "TeamDisplayName": team.DisplayName, "Month": month[:3], "Day": day, "Year": year}) - bodyPage := NewServerTemplatePage("post_body", c.Locale) + bodyPage := NewServerTemplatePage("post_body", profileMap[id].Locale) bodyPage.Props["SiteURL"] = c.GetSiteURL() bodyPage.Props["PostMessage"] = model.ClearMentionTags(post.Message) bodyPage.Props["TeamLink"] = teamURL + "/channels/" + channel.Name diff --git a/model/search_params.go b/model/search_params.go index 9a7406a07d..d317826914 100644 --- a/model/search_params.go +++ b/model/search_params.go @@ -89,9 +89,9 @@ func parseSearchFlags(input []string) ([]string, [][2]string) { } if !isFlag { - // trim off surrounding punctuation + // trim off surrounding punctuation (note that we leave trailing asterisks to allow wildcards) word = puncStart.ReplaceAllString(word, "") - word = puncEnd.ReplaceAllString(word, "") + word = puncEndWildcard.ReplaceAllString(word, "") // and remove extra pound #s word = hashtagStart.ReplaceAllString(word, "#") diff --git a/model/search_params_test.go b/model/search_params_test.go index 59eb0a113e..7138d82c4a 100644 --- a/model/search_params_test.go +++ b/model/search_params_test.go @@ -216,4 +216,8 @@ func TestParseSearchParams(t *testing.T) { if sp := ParseSearchParams("##hashtag +#plus+"); len(sp) != 1 || sp[0].Terms != "#hashtag #plus" || sp[0].IsHashtag != true || len(sp[0].InChannels) != 0 || len(sp[0].FromUsers) != 0 { t.Fatalf("Incorrect output from parse search params: %v", sp[0]) } + + if sp := ParseSearchParams("wildcar*"); len(sp) != 1 || sp[0].Terms != "wildcar*" || sp[0].IsHashtag != false || len(sp[0].InChannels) != 0 || len(sp[0].FromUsers) != 0 { + t.Fatalf("Incorrect output from parse search params: %v", sp[0]) + } } diff --git a/model/utils.go b/model/utils.go index 695d4a0cb1..808c89e302 100644 --- a/model/utils.go +++ b/model/utils.go @@ -291,6 +291,7 @@ var validHashtag = regexp.MustCompile(`^(#[A-Za-zäöüÄÖÜß]+[A-Za-z0-9äö var puncStart = regexp.MustCompile(`^[.,()&$!\?\[\]{}':;\\<>\-+=%^*|]+`) var hashtagStart = regexp.MustCompile(`^#{2,}`) var puncEnd = regexp.MustCompile(`[.,()&$#!\?\[\]{}':;\\<>\-+=%^*|]+$`) +var puncEndWildcard = regexp.MustCompile(`[.,()&$#!\?\[\]{}':;\\<>\-+=%^|]+$`) func ParseHashtags(text string) (string, string) { words := strings.Fields(text) diff --git a/web/react/components/admin_console/license_settings.jsx b/web/react/components/admin_console/license_settings.jsx index fdbe912ef5..d4dfa13f24 100644 --- a/web/react/components/admin_console/license_settings.jsx +++ b/web/react/components/admin_console/license_settings.jsx @@ -120,8 +120,7 @@ class LicenseSettings extends React.Component { expires: Utils.displayDate(parseInt(global.window.mm_license.ExpiresAt, 10)), ldap: global.window.mm_license.LDAP }} - defaultMessage='
This compiled release of Mattermost platform is provided under a commercial license - from Mattermost, Inc. based on your subscription level and is subject to the Terms of Service.
+ defaultMessage='This compiled release of Mattermost platform is provided under a commercial license from Mattermost, Inc. based on your subscription level and is subject to the Terms of Service.
Your subscription details are as follows:
Name: {name}
- );
- playbackControls = '';
- }
-
var thumbnail;
if (type === 'image') {
- if (this.state.playing) {
- thumbnail = (
-
+
+
+
+
+
+
+ This compiled release of Mattermost platform is provided under a commercial licensefrom Mattermost, Inc. based on your subscription level and is subject to the Terms of Service.
Your subscription details are as follows:
Name: {name}This compiled release of Mattermost platform is provided under a commercial license from Mattermost, Inc. based on your subscription level and is subject to the Terms of Service.
Your subscription details are as follows:
Name: {name}Esta versión compilada de la plataforma de Mattermost es provista bajo una licencia comercial de Mattermost, Inc. en función en su nivel de subscripción y bajo los Términos del Servicio.
Los detalles de tu subscripción son los siguientes:
Nombre: {name}Esta versão compilada da plataforma Mattermost é fornecida sob a licença comercialpara Mattermost, Inc. com base em seu nível de subscrição e está sujeito a Termos de Serviço.
Os detalhes de sua assinatura, são como segue:
Nome: {name}Esta versão compilada da plataforma Mattermost é fornecida sob a licença comercial para Mattermost, Inc. com base em seu nível de subscrição e está sujeito a Termos de Serviço.
Os detalhes de sua assinatura, são como segue:
Nome: {name}