aboutsummaryrefslogtreecommitdiff
path: root/plugins/Matrix.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Matrix.hpp')
-rw-r--r--plugins/Matrix.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 0c12831..45dd1f7 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -412,11 +412,14 @@ namespace QuickMedia {
const std::string title;
};
- // Dummy, only play one video. TODO: Play all videos in room, as related videos?
+ // Only play one video. TODO: Play all videos in room, as related videos?
class MatrixVideoPage : public VideoPage {
public:
- MatrixVideoPage(Program *program) : VideoPage(program, "") {}
+ MatrixVideoPage(Program *program, std::string filename) : VideoPage(program, ""), filename(std::move(filename)) {}
const char* get_title() const override { return ""; }
+ std::string get_filename() override { return filename; }
+ private:
+ std::string filename;
};
class MatrixChatPage : public Page {
@@ -543,7 +546,8 @@ namespace QuickMedia {
// |relates_to| is from |BodyItem.userdata| and is of type |Message*|
PluginResult post_reaction(RoomData *room, const std::string &body, void *relates_to, std::string &event_id_response);
- PluginResult post_file(RoomData *room, const std::string &filepath, std::string &event_id_response, std::string &err_msg);
+ // If filename is empty then the filename is extracted from filepath
+ PluginResult post_file(RoomData *room, const std::string &filepath, std::string filename, std::string &event_id_response, std::string &err_msg);
PluginResult login(const std::string &username, const std::string &password, const std::string &homeserver, std::string &err_msg);
PluginResult logout();