EionRobb / purple-mattermost

A libpurple/Pidgin plugin for Mattermost
GNU General Public License v3.0
93 stars 23 forks source link

set mmfile uri if not set #138

Closed lubosan80 closed 3 years ago

lubosan80 commented 3 years ago

When there is no uri on mmfile set one. It works pretty well in my environment where we have server without public links. It presents the direct link onto the file which is more comfortable than opening the whole web client I think.

EionRobb commented 3 years ago

Is "/files/" the same for all mattermost installs?

Any reason that you dup the mem then free it, rather than just reusing the existing memory?

lubosan80 commented 3 years ago
  1. I think yes. First this url is used in plugin already and according to aip/v4 which the plugin is using it should work. https://api.mattermost.com/#tag/files/paths/~1files~1{file_id}/get

  2. Well maybe I had during the testing but now definitely I don't. Removed the strdup in last commit.