summary refs log tree commit diff
path: root/src/Cache_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache_p.h')
-rw-r--r--src/Cache_p.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Cache_p.h b/src/Cache_p.h
index f8716e81..121e7e66 100644
--- a/src/Cache_p.h
+++ b/src/Cache_p.h
@@ -394,8 +394,19 @@ private:
                 auto display_name =
                   e->content.display_name.empty() ? e->state_key : e->content.display_name;
 
+                std::string inviter = "";
+                if (e->content.membership == mtx::events::state::Membership::Invite) {
+                    inviter = e->sender;
+                }
+
                 // Lightweight representation of a member.
-                MemberInfo tmp{display_name, e->content.avatar_url, e->content.reason};
+                MemberInfo tmp{
+                  display_name,
+                  e->content.avatar_url,
+                  inviter,
+                  e->content.reason,
+                  e->content.is_direct,
+                };
 
                 membersdb.put(txn, e->state_key, nlohmann::json(tmp).dump());
                 break;