aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 9371900..25225d7 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -12,6 +12,12 @@
namespace QuickMedia {
struct RoomData;
+ enum class UserResolveState {
+ NOT_RESOLVED,
+ RESOLVING,
+ RESOLVED
+ };
+
struct UserInfo {
friend struct RoomData;
UserInfo(RoomData *room, std::string user_id);
@@ -20,6 +26,7 @@ namespace QuickMedia {
RoomData *room;
const sf::Color display_name_color;
const std::string user_id;
+ UserResolveState resolve_state;
private:
std::string display_name;
std::string avatar_url;
@@ -37,6 +44,8 @@ namespace QuickMedia {
MEMBERSHIP
};
+ bool is_visual_media_message_type(MessageType message_type);
+
enum class RelatedEventType {
NONE,
REPLY,
@@ -110,6 +119,7 @@ namespace QuickMedia {
// These 4 variables are set by QuickMedia, not the matrix plugin
bool last_message_read = true;
+ bool users_fetched = false;
time_t last_read_message_timestamp = 0;
void *userdata = nullptr; // Pointer to BodyItem. Note: this has to be valid as long as the room is valid
@@ -464,6 +474,8 @@ namespace QuickMedia {
std::shared_ptr<Message> get_message_by_id(RoomData *room, const std::string &event_id);
RoomData* get_room_by_id(const std::string &id);
+ void update_user_with_latest_state(RoomData *room, const std::string &user_id);
+ void update_room_users(RoomData *room);
bool use_tor = false;
private: