summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-12-15 22:13:36 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2023-12-16 21:12:13 +0100
commit0bcef826baaa6a335d8fddafdbebd00fbf421c2c (patch)
tree37abb37f8b811923e25180abeac3307d15f0b9ca /src/main.cpp
parente4b5eb30af94991e19ac324d5e6ec616e6a71d36 (diff)
Use extended identity data for name
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0eb379b..3100695 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -289,14 +289,15 @@ void startServer(const vector<string> &)
config.service<DirectMessageService>()
.onUpdate([](const DirectMessageThread & thread, ssize_t, ssize_t) {
- if (thread.at(0).from()->sameAs(server->identity()))
+ if (thread.at(0).from()->sameAs(server->identity().finalOwner()))
return;
ostringstream ss;
string name = "<unnamed>";
- if (auto opt = thread.peer().name())
- name = *opt;
+ if (auto from = thread.at(0).from())
+ if (auto fname = from->name())
+ name = *fname;
ss << "dm-received"
<< " from " << name