diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/message.go | 1 | ||||
-rw-r--r-- | model/session.go | 4 | ||||
-rw-r--r-- | model/utils.go | 2 |
3 files changed, 4 insertions, 3 deletions
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 { 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 diff --git a/model/utils.go b/model/utils.go index 093a54e38..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} |