4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 17:49:23 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Wim
d2caea70a2 Release v1.1.1 2017-09-04 13:43:30 +02:00
Wim
21143cf5ee Fix public links (mattermost) 2017-09-04 12:50:42 +02:00
4 changed files with 12 additions and 8 deletions

View File

@ -53,7 +53,7 @@ See https://github.com/42wim/matterbridge/wiki
# Installing
## Binaries
* Latest stable release [v1.1.0](https://github.com/42wim/matterbridge/releases/latest)
* Latest stable release [v1.1.1](https://github.com/42wim/matterbridge/releases/latest)
* Development releases (follows master) can be downloaded [here](https://dl.bintray.com/42wim/nightly/)
## Building

View File

@ -1,3 +1,7 @@
# v1.1.1
## Bugfix
* mattermost: fix public links
# v1.1.0
## New features
* general: Add better editing support. (actually edit the messages on bridges that support it)

View File

@ -11,7 +11,7 @@ import (
)
var (
version = "1.1.0"
version = "1.1.1"
githash string
)

View File

@ -511,8 +511,8 @@ func (m *MMClient) GetPosts(channelId string, limit int) *model.PostList {
}
func (m *MMClient) GetPublicLink(filename string) string {
res, err := m.Client.GetFileLink(filename)
if err != nil {
res, resp := m.Client.GetFileLink(filename)
if resp.Error != nil {
return ""
}
return res
@ -521,8 +521,8 @@ func (m *MMClient) GetPublicLink(filename string) string {
func (m *MMClient) GetPublicLinks(filenames []string) []string {
var output []string
for _, f := range filenames {
res, err := m.Client.GetFileLink(f)
if err != nil {
res, resp := m.Client.GetFileLink(f)
if resp.Error != nil {
continue
}
output = append(output, res)
@ -538,8 +538,8 @@ func (m *MMClient) GetFileLinks(filenames []string) []string {
var output []string
for _, f := range filenames {
res, err := m.Client.GetFileLink(f)
if err != nil {
res, resp := m.Client.GetFileLink(f)
if resp.Error != nil {
// public links is probably disabled, create the link ourselves
output = append(output, uriScheme+m.Credentials.Server+model.API_URL_SUFFIX_V3+"/files/"+f+"/get")
continue