From 4a28e6c5dc7e4256ce48d1d8a7869554afa33dc8 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 27 Jul 2015 11:30:10 -0800 Subject: Fixes mm-1502 changing session age to 30 days --- model/session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'model') diff --git a/model/session.go b/model/session.go index 9fd3b9ec3..c812f83e2 100644 --- a/model/session.go +++ b/model/session.go @@ -10,9 +10,9 @@ import ( const ( SESSION_TOKEN = "MMSID" - SESSION_TIME_WEB_IN_DAYS = 365 + SESSION_TIME_WEB_IN_DAYS = 30 SESSION_TIME_WEB_IN_SECS = 60 * 60 * 24 * SESSION_TIME_WEB_IN_DAYS - SESSION_TIME_MOBILE_IN_DAYS = 365 + SESSION_TIME_MOBILE_IN_DAYS = 30 SESSION_TIME_MOBILE_IN_SECS = 60 * 60 * 24 * SESSION_TIME_MOBILE_IN_DAYS SESSION_CACHE_IN_SECS = 60 * 10 SESSION_CACHE_SIZE = 10000 -- cgit v1.2.3-1-g7c22 From c9459feb59a3dc05de229aea7652b0a726ac98bf Mon Sep 17 00:00:00 2001 From: nickago Date: Mon, 13 Jul 2015 13:18:50 -0700 Subject: When removed from a channel, user is sent back to town square and that channel is removed from their sidebar --- model/message.go | 1 + 1 file changed, 1 insertion(+) (limited to 'model') diff --git a/model/message.go b/model/message.go index 52ee69e8f..ec4817b2a 100644 --- a/model/message.go +++ b/model/message.go @@ -16,6 +16,7 @@ const ( ACTION_VIEWED = "viewed" ACTION_NEW_USER = "new_user" ACTION_USER_ADDED = "user_added" + ACTION_USER_REMOVED = "user_removed" ) type Message struct { -- cgit v1.2.3-1-g7c22 From fbb2477643f4043ef2b5827cd14402b9cdeb7241 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 27 Jul 2015 12:34:36 -0400 Subject: Allow files without extensions to be uploaded as attachments to posts --- model/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model') diff --git a/model/utils.go b/model/utils.go index 093a54e38..4c698be2a 100644 --- a/model/utils.go +++ b/model/utils.go @@ -319,6 +319,6 @@ func ClearMentionTags(post string) string { } var UrlRegex = regexp.MustCompile(`^((?:[a-z]+:\/\/)?(?:(?:[a-z0-9\-]+\.)+(?:[a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal))(:[0-9]{1,5})?(?:\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(?:\?[a-z0-9+_~\-\.%=&]*)?)?(?:#[a-zA-Z0-9!$&'()*+.=-_~:@/?]*)?)(?:\s+|$)$`) -var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+\.[A-Za-z0-9]{3,})`) +var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+(\.[A-Za-z0-9]{3,})?)`) var SplitRunes = map[rune]bool{',': true, ' ': true, '.': true, '!': true, '?': true, ':': true, ';': true, '\n': true, '<': true, '>': true, '(': true, ')': true, '{': true, '}': true, '[': true, ']': true, '+': true, '/': true, '\\': true} -- cgit v1.2.3-1-g7c22 From 892fe2b7b6b801e31dd23d74be14d68c989a4d12 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 28 Jul 2015 10:10:44 -0400 Subject: Added non-capturing group to regex used for matching local file urls --- model/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model') diff --git a/model/utils.go b/model/utils.go index 4c698be2a..c7f991da2 100644 --- a/model/utils.go +++ b/model/utils.go @@ -319,6 +319,6 @@ func ClearMentionTags(post string) string { } var UrlRegex = regexp.MustCompile(`^((?:[a-z]+:\/\/)?(?:(?:[a-z0-9\-]+\.)+(?:[a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal))(:[0-9]{1,5})?(?:\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(?:\?[a-z0-9+_~\-\.%=&]*)?)?(?:#[a-zA-Z0-9!$&'()*+.=-_~:@/?]*)?)(?:\s+|$)$`) -var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+(\.[A-Za-z0-9]{3,})?)`) +var PartialUrlRegex = regexp.MustCompile(`/([A-Za-z0-9]{26})/([A-Za-z0-9]{26})/((?:[A-Za-z0-9]{26})?.+(?:\.[A-Za-z0-9]{3,})?)`) var SplitRunes = map[rune]bool{',': true, ' ': true, '.': true, '!': true, '?': true, ':': true, ';': true, '\n': true, '<': true, '>': true, '(': true, ')': true, '{': true, '}': true, '[': true, ']': true, '+': true, '/': true, '\\': true} -- cgit v1.2.3-1-g7c22