summaryrefslogtreecommitdiff
path: root/yc.cpp
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-02-04 11:34:38 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-02-04 15:24:48 +0100
commit23cc4be5bc02328fe73ccbd67493dd71ef2e2b8f (patch)
treeb9e1a7a416f004d96671c0abf597524946b9dda3 /yc.cpp
parent3b9973552ec613b37fb511f3a0ae24dacb1e4366 (diff)
downloadyachat6-23cc4be5bc02328fe73ccbd67493dd71ef2e2b8f.tar.gz
Add accounts and login pages
Diffstat (limited to 'yc.cpp')
-rw-r--r--yc.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/yc.cpp b/yc.cpp
index 94798f6..28e780c 100644
--- a/yc.cpp
+++ b/yc.cpp
@@ -77,6 +77,11 @@ void Yc::addOutMessage(const QString &msg, const QDateTime &dt)
#endif
}
+void Yc::storeAccount(Client *c)
+{
+ creds.store(c);
+}
+
void Yc::addAccount(Client *const c)
{
c->configuration().setAutoReconnectionEnabled(true);
@@ -165,6 +170,16 @@ void Yc::retrieveConversations()
}
}
+QStringList Yc::accounts() const
+{
+ QStringList ret;
+
+ for (const auto c : clients)
+ ret << c->jidBare();
+
+ return ret;
+}
+
void Yc::init()
{
creds.load().then(this,