Fix for RsServiceType::WIRE

This commit is contained in:
defnax 2026-04-19 21:00:07 +02:00
parent 87d0925a92
commit fefc65b03e

View File

@ -60,6 +60,7 @@
#include "retroshare/rsgxschannels.h"
#include "retroshare/rsgxsforums.h"
#include "retroshare/rsposted.h"
#include <retroshare/rswire.h>
#include <iostream>
#include <algorithm>
@ -1888,6 +1889,7 @@ QString IdDialog::createUsageString(const RsIdentityUsage& u) const
case RsServiceType::GXS_TRANS: return tr("GxsMail author ");
case RsServiceType::GXSCIRCLE: service_name = tr("GxsCircles"); service_type = RetroShareLink::TYPE_CIRCLES; break ;
case RsServiceType::WIRE: service_name = tr("Wire"); service_type = RetroShareLink::TYPE_WIRE; break ;
default:
service_name = tr("Unknown (service=")+QString::number((int)u.mServiceId,16)+")"; service_type = RetroShareLink::TYPE_UNKNOWN ;
@ -2054,6 +2056,13 @@ QString IdDialog::getGroupName(uint32_t service_type, const RsGxsGroupId& groupI
if (!name.isEmpty()) return name;
}
}
else if (service_type == RetroShareLink::TYPE_WIRE && rsWire) {
RsWireGroupSPtr group; // Shared pointer for the result
if (rsWire->getWireGroup(groupId, group) && group) {
QString name = QString::fromUtf8(group->mMeta.mGroupName.c_str());
if (!name.isEmpty()) return name;
}
}
// Returns the raw ID string as the label
return QString::fromStdString(groupId.toStdString());