diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-17 12:57:52 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-17 12:57:52 -0400 |
commit | bd225dca738400495a8ef8fea0fc81fd11d225c7 (patch) | |
tree | ff9f6fa2e119e6dd62081d73b91a63aad9a55071 /model/utils.go | |
parent | 876ef15ac126f0a9aec0b9ad4e98a35223641167 (diff) | |
parent | 919fb8274bc13beaa260602f8f77bbb5a526f1a3 (diff) | |
download | chat-bd225dca738400495a8ef8fea0fc81fd11d225c7.tar.gz chat-bd225dca738400495a8ef8fea0fc81fd11d225c7.tar.bz2 chat-bd225dca738400495a8ef8fea0fc81fd11d225c7.zip |
Merge pull request #2418 from ZBoxApp/PLT-2053
PLT-2053: Option to enable full snippets in push notifications
Diffstat (limited to 'model/utils.go')
-rw-r--r-- | model/utils.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/model/utils.go b/model/utils.go index 808c89e30..1ce41bb30 100644 --- a/model/utils.go +++ b/model/utils.go @@ -367,3 +367,15 @@ func IsValidHttpUrl(rawUrl string) bool { return true } + +func IsValidHttpsUrl(rawUrl string) bool { + if strings.Index(rawUrl, "https://") != 0 { + return false + } + + if _, err := url.ParseRequestURI(rawUrl); err != nil { + return false + } + + return true +} |