Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no pasted images in chat #77

Open
AlexeyGusev opened this issue Aug 30, 2018 · 6 comments
Open

no pasted images in chat #77

AlexeyGusev opened this issue Aug 30, 2018 · 6 comments
Assignees
Labels

Comments

@AlexeyGusev
Copy link

this might be a pidgin-issue and not a mattermost-plugin issue, but I will report it here anyway.

You can see pasted images with mattermost' own client in a chat, but pidgin displays only empty line followed by another line containing <a href=". Pasted graphics is not displayed.

@jaroslawp
Copy link
Collaborator

it is likely plugin issue: the code tries to put in the URL of the file but seems to fail: does it happen to all pasted files in your setup or only some ?

@jaroslawp jaroslawp self-assigned this Sep 15, 2018
@AlexeyGusev
Copy link
Author

No, I just see this in chat:

(12:28:35) some-buddy:  
(12:28:35) some-buddy: <a href="

when somebody sends me a image, gif or jpeg – doesn't matter.

@jaroslawp
Copy link
Collaborator

It looks like we get (not properly handled) empty reply from MM server: does your server allow public file links ?.

I just got image handling reimplemented (plugin allows now to send/receive images) here: ea49f1c (disclaimer: this is really untested code, works for me with libpurple2, have not tried with 3 ...).

@jaroslawp jaroslawp added the bug label Sep 19, 2018
@AlexeyGusev
Copy link
Author

It looks like we get (not properly handled) empty reply from MM server: does your server allow public file links ?

Don't really know how to answer :) What is a public file link? In browser chat, however, image URL looks like this: https://<MM_SERVER_HOSTNAME>/api/v4/files/hn6hzafszig7ukj73eghhqashe/preview, right-clicked on image to copy image URL in firefox.

@jaroslawp
Copy link
Collaborator

The public links are a way of getting file contents while not using MM client - do not require authentication or any specific protocol (just plain http):
https://docs.mattermost.com/administration/config-settings.html#public-links
(that feature is disabled by default on MM server)

I have implemented checking for public links server capability (plus server info, slash commands capability) here: a64a9b4
this could tell us more about the problem: you should see error and in 'Accounts' -> 'your account' -> 'Server info' some detailed information about MM server and enabled features.

@AlexeyGusev
Copy link
Author

downloaded, built and installed a64a9b4

'Accounts' -> 'your account' -> 'Server info' shows:

Server Version: 5.2.0 (we upgraded yesterday from 4 to 5)
Slash commands: enabled
Public file links: enabled
Build number: 5.2.2

still no images in pidgin chat window (wonder if pidgin can display images at all?), but instead of

(12:28:35) some-buddy:  
(12:28:35) some-buddy: <a href="

I see just

(12:28:35) some-buddy:  
(12:28:35) some-buddy:

now. In logs, this might be of interest (from pidgin --debug output):

(10:05:31) GLib-GObject: value "-1777675255" of type 'gint' is invalid or out of range for property 'weight' of type 'gint'

(10:06:04) mattermost: got errno 11, read_len 0 from websocket thread

next one is slightly offtopic, but I will report it here anyway:

(10:05:31) log: Failed to open log file "/home/<USER>/.purple/logs/some-buddy.log" for reading: No such file or directory

in fact, logs are placed into /home/<USER>/.purple/logs/mattermost/<your_account>/some-buddy/<TIMESTAMP>.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants