summaryrefslogtreecommitdiffstats
blob: f567a63ac5d7570016bcabb5be50c4289e6202a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "Swiften/LinkLocal/LinkLocalService.h"

namespace Swift {

String LinkLocalService::getDescription() const {
	LinkLocalServiceInfo info = getInfo();
	if (!info.getNick().isEmpty()) {
		return info.getNick();
	}
	else if (!info.getFirstName().isEmpty()) {
		String result = info.getFirstName();
		if (!info.getLastName().isEmpty()) {
			result += " " + info.getLastName();
		}
		return result;
	}
	else if (!info.getLastName().isEmpty()) {
		return info.getLastName();
	}
	return getName();
}

}