summary refs log tree commit diff
path: root/src/ui/UserProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/UserProfile.cpp')
-rw-r--r--src/ui/UserProfile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp
index 58150ed7..62488954 100644
--- a/src/ui/UserProfile.cpp
+++ b/src/ui/UserProfile.cpp
@@ -152,6 +152,15 @@ UserProfile::isSelf() const
 }
 
 void
+UserProfile::refreshDevices()
+{
+    std::vector<std::string> keysToRequest;
+    keysToRequest.push_back(this->userid_.toStdString());
+    cache::client()->markUserKeysOutOfDate(keysToRequest);
+    fetchDeviceList(this->userid_);
+}
+
+void
 UserProfile::fetchDeviceList(const QString &userID)
 {
     auto localUser = utils::localUser();
@@ -205,6 +214,9 @@ UserProfile::fetchDeviceList(const QString &userID)
                           device, DeviceId(device.device_id), UserId(other_user_id)))
                         verified = verification::Status::VERIFIED;
 
+                    if (isSelf() && device.device_id == ::http::client()->device_id())
+                        verified = verification::Status::SELF;
+
                     deviceInfo.push_back(
                       {QString::fromStdString(d.first),
                        QString::fromStdString(device.unsigned_info.device_display_name),