From 354ed40016d3e768fdd56529cc273bfef3dbc336 Mon Sep 17 00:00:00 2001 From: Billy Ernest Date: Sat, 16 Mar 2019 08:26:46 -0400 Subject: [PATCH] Added rss.png to httpserver and changed version number --- Makefile | 2 ++ images/rss.png | Bin 0 -> 5822 bytes plugin.json | 4 ++-- server/images/rss.png | Bin 0 -> 5822 bytes server/plugin.go | 43 ++++++++++++++++-------------------------- 5 files changed, 20 insertions(+), 29 deletions(-) create mode 100644 images/rss.png create mode 100644 server/images/rss.png diff --git a/Makefile b/Makefile index 02a82c1..1fb6828 100644 --- a/Makefile +++ b/Makefile @@ -70,9 +70,11 @@ endif server: server/.depensure ifneq ($(HAS_SERVER),) mkdir -p server/dist; + mkdir -p server/dist/images; cd server && env GOOS=linux GOARCH=amd64 $(GO) build -o dist/plugin-linux-amd64; cd server && env GOOS=darwin GOARCH=amd64 $(GO) build -o dist/plugin-darwin-amd64; cd server && env GOOS=windows GOARCH=amd64 $(GO) build -o dist/plugin-windows-amd64.exe; + cp images/rss.png server/dist/images/rss.png endif ## Ensures NPM dependencies are installed without having to run this all the time. diff --git a/images/rss.png b/images/rss.png new file mode 100644 index 0000000000000000000000000000000000000000..24284b6daf21c0862e7a0b5ba9dc956468b431aa GIT binary patch literal 5822 zcmV;v7D4G!Nk&Gt761TOMM6+kP&iDf761S*f50CQ3CC?4NfK=NQ{CA7({<0aDMa)? zg+62cq^3H&mWy@sblGZj!tHXYQN!i3bx@SyxL6mBGSsDNlv$Rk%cUq|WpFuSEHBHr z7#Yi0#>EjG{jiKn7iYBD+T)ZziazPWX(LIJRB&L!f$hIl2@@VX*t4GvC?iQy0Ot4!O<3^{0vO@OC< zZ7L5L0!|o#M;i)e0|+MCz^#Fga=@j5gW%f0u))#5gX04wh!Bhh=BENKPPYg}FdDe2 z0y1SpXkY}66ry}7e=QuNK;RByQ@K!tLkCD1pkNy5rW%L?$KL_lv>!~X2{QU>A&3qf zt6SM*@kj91QS;c9wr$eU+;TLl(^j;hplu^3;ZOS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z02)_WR1>Ygg~yzG;(BK7Ev-y&G{D6x0bq$)*H>>IILx zy}53^b^h&(;TU}G=EKy^iNg+Ct-*&SR*MB`F7cUq@89s7;C;~B(ejRxbJKs?nddLP I`;f{K09+XaCIA2c literal 0 HcmV?d00001 diff --git a/plugin.json b/plugin.json index 860e0ee..a880123 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "rssfeed", "name": "RSSFeed", "description": "This plugin serves as an rss subscription service for Mattermost.", - "version": "0.0.1", + "version": "0.0.2", "server": { "executables": { "linux-amd64": "server/dist/plugin-linux-amd64", @@ -18,7 +18,7 @@ "key": "Heartbeat", "display_name": "Time window betwteen rss feed checks (minutes).", "type": "text", - "help_text": "This is used to set a timer for the system to know when to go check to see if there is any new data in the subscribed rss feeds. Defaults to 15 minutes." + "help_text": "This is used to set a timer for the system to know when to go check to see if there is any new data in the subscribed rss feeds. Defaults to 15 minutes. (Not currently working, defaults to 15 min.)" }, { "key": "Username", diff --git a/server/images/rss.png b/server/images/rss.png new file mode 100644 index 0000000000000000000000000000000000000000..24284b6daf21c0862e7a0b5ba9dc956468b431aa GIT binary patch literal 5822 zcmV;v7D4G!Nk&Gt761TOMM6+kP&iDf761S*f50CQ3CC?4NfK=NQ{CA7({<0aDMa)? zg+62cq^3H&mWy@sblGZj!tHXYQN!i3bx@SyxL6mBGSsDNlv$Rk%cUq|WpFuSEHBHr z7#Yi0#>EjG{jiKn7iYBD+T)ZziazPWX(LIJRB&L!f$hIl2@@VX*t4GvC?iQy0Ot4!O<3^{0vO@OC< zZ7L5L0!|o#M;i)e0|+MCz^#Fga=@j5gW%f0u))#5gX04wh!Bhh=BENKPPYg}FdDe2 z0y1SpXkY}66ry}7e=QuNK;RByQ@K!tLkCD1pkNy5rW%L?$KL_lv>!~X2{QU>A&3qf zt6SM*@kj91QS;c9wr$eU+;TLl(^j;hplu^3;ZOSReh&Z<{ZD(EL72=;<|Ye~smx?9 zf5|8dgHh7JU?yoWm{_*9O_3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h&(;TU}G=EKy^iNg+Ct-*&SR*MB`F7cUq@89s7;C;~B(ejRxbJKs?nddLP I`;f{K09+XaCIA2c literal 0 HcmV?d00001 diff --git a/server/plugin.go b/server/plugin.go index 2771b79..fc0ac6e 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -5,13 +5,14 @@ import ( "github.com/mattermost/mattermost-server/mlog" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/plugin" + "io/ioutil" + "net/http" "strconv" - //"net/http" "sync" "time" ) -const RSSFEED_ICON_URL = "https://en.wikipedia.org/wiki/RSS#/media/File:Feed-icon.svg" +const RSSFEED_ICON_URL = "https://mattermost.gridprotectionalliance.org/plugins/rssfeed/images/rss.png" const RSSFEED_USERNAME = "RSSFeed Plugin" // RSSFeedPlugin Object @@ -27,35 +28,23 @@ type RSSFeedPlugin struct { } // ServeHTTP hook from mattermost plugin -/* func (p *RSSFeedPlugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - switch path := r.URL.Path; path { - case "/initiate": - go p.setupHeartBeat() - - html := ` - - - - - - -

Completed initializing to RSSFeed. Please close this window.

- - - ` - - w.Header().Set("Content-Type", "text/html") - w.Write([]byte(html)) - + case "/images/rss.png": + data, err := ioutil.ReadFile(string("plugins/rssfeed/server/dist/images/rss.png")) + if err == nil { + w.Header().Set("Content-Type", "image/png") + w.Write(data) + } else { + w.WriteHeader(404) + w.Write([]byte("404 Something went wrong - " + http.StatusText(404))) + p.API.LogInfo("/imags/rss.png err = ", err.Error()) + } default: + w.Header().Set("Content-Type", "application/json") http.NotFound(w, r) } -}*/ +} // OnActivate is a plugin hook from the Mattermost plugin API func (p *RSSFeedPlugin) OnActivate() error { @@ -202,9 +191,9 @@ func (p *RSSFeedPlugin) createBotPost(channelID string, message string, postType Message: message, Type: postType, Props: map[string]interface{}{ - "from_webhook": "true", "override_username": RSSFEED_USERNAME, "override_icon_url": RSSFEED_ICON_URL, + "from_webhook": true, }, }