diff options
author | White_Rabbit <bruno@tracciabi.li> | 2017-09-27 14:53:44 +0200 |
---|---|---|
committer | White_Rabbit <bruno@tracciabi.li> | 2018-02-22 14:41:33 +0100 |
commit | 1ee4cc01f6e1c6ef88143fb0052d864576333dcb (patch) | |
tree | 98e218f5511c05e930871477133e0b795c4b9810 /matrix-api.h | |
parent | 1a53f61998407013719fdabdcff4ead3e9715340 (diff) | |
download | purple-matrix-1ee4cc01f6e1c6ef88143fb0052d864576333dcb.tar.gz |
Improve media handling
Handle m.video, m.file, m.audio and m.image in _handle_incoming_media.
Remove _handle incoming_image. On incoming media, always print a chat
message with the download link and mimetype/size. If a thumbnail_url is
available and the thumbnail size is small, download and show that. Otherwise,
only for m_image, ask for a server generated thumbnail.
Diffstat (limited to 'matrix-api.h')
-rw-r--r-- | matrix-api.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/matrix-api.h b/matrix-api.h index 375e88a..089b9b3 100644 --- a/matrix-api.h +++ b/matrix-api.h @@ -301,6 +301,15 @@ MatrixApiRequestData *matrix_api_upload_file(MatrixConnectionData *conn, MatrixApiBadResponseCallback bad_response_callback, gpointer user_data); + +/* Get the complete download url for a given uri + * + * @param homeserver The server hosting the file + * @param uri The file uri + */ +GString *get_download_url(const gchar *homeserver, const gchar *uri); + + /** * Download a file * |