diff options
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 78409e1d..4daf44f3 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -2073,3 +2073,16 @@ TimelineModel::roomMemberCount() const { return (int)cache::client()->memberCount(room_id_.toStdString()); } + +QString +TimelineModel::directChatAvatarMxid() const +{ + if (roomMemberCount() < 3) { + QString id; + for (auto member : cache::getMembers(room_id_.toStdString())) + if (member.user_id != UserSettings::instance()->userId()) + id = member.user_id; + return id; + } else + return ""; +} |