MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / OnlineTextSpecial

Function OnlineTextSpecial

Telegram/SourceFiles/data/data_peer_values.cpp:50–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
51 if (user->isNotificationsUser()) {
52 return tr::lng_status_service_notifications(tr::now);
53 } else if (user->isSupport()) {
54 return tr::lng_status_support(tr::now);
55 } else if (user->isBot()) {
56 if (const auto count = user->botInfo->activeUsers) {
57 return tr::lng_bot_status_users(
58 tr::now,
59 lt_count_decimal,
60 count);
61 }
62 auto seesAllMessages = (user->botInfo->readsAllHistory);
63 return seesAllMessages
64 ? tr::lng_status_bot_reads_all(tr::now)
65 : tr::lng_status_bot_not_reads_all(tr::now);
66 } else if (user->isServiceUser()) {
67 return tr::lng_status_support(tr::now);
68 }
69 return std::nullopt;
70}
71
72std::optional<QString> OnlineTextCommon(LastseenStatus status, TimeId now) {
73 if (status.isOnline(now)) {

Callers 2

OnlineTextFunction · 0.85
OnlineTextFullFunction · 0.85

Calls 4

isNotificationsUserMethod · 0.80
isSupportMethod · 0.80
isServiceUserMethod · 0.80
isBotMethod · 0.45

Tested by

no test coverage detected