From 0bcef826baaa6a335d8fddafdbebd00fbf421c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 15 Dec 2023 22:13:36 +0100 Subject: Use extended identity data for name --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') 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 &) config.service() .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 = ""; - 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 -- cgit v1.2.3