diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-01-09 09:25:08 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-01-09 09:25:08 +0100 |
commit | a06362ad111c64dde9fc0ed25c042c295d8656b3 (patch) | |
tree | ea43b8f389c96cc7074c18133690c5d4320dae8d /src/plugins | |
parent | 0910f4ce6883981c232811ee4d71da4a93e20845 (diff) |
Matrix: leave->join room message
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index c87d604..5c7e27b 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1861,7 +1861,10 @@ namespace QuickMedia { const rapidjson::Value &prev_avatar_url_json = GetMember(prev_content_json, "avatar_url"); const rapidjson::Value &new_displayname_json = GetMember(*content_json, "displayname"); const rapidjson::Value &new_avatar_url_json = GetMember(*content_json, "avatar_url"); - if(new_displayname_json.IsString() && (!prev_displayname_json.IsString() || strcmp(new_displayname_json.GetString(), prev_displayname_json.GetString()) != 0)) { + const rapidjson::Value &prev_membership_json = GetMember(prev_content_json, "membership"); + if(prev_membership_json.IsString()) { + body = user_display_name + " joined the room"; + } else if(new_displayname_json.IsString() && (!prev_displayname_json.IsString() || strcmp(new_displayname_json.GetString(), prev_displayname_json.GetString()) != 0)) { std::string new_displayname_str = std::string(new_displayname_json.GetString()); std::string prev_displayname_str; if(prev_displayname_json.IsString()) |