mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
Add MamManager.getArchiveAddress()
This commit is contained in:
parent
98a029e9c7
commit
7a2e4140c7
1 changed files with 18 additions and 0 deletions
|
@ -112,6 +112,24 @@ public final class MamManager extends Manager {
|
||||||
serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(connection);
|
serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The the XMPP address of this MAM archive. Note that this method may return {@code null} if this MamManager
|
||||||
|
* handles the local entity's archive and if the connection has never been authenticated at least once.
|
||||||
|
*
|
||||||
|
* @return the XMPP address of this MAM archive or {@code null}.
|
||||||
|
* @since 4.3.0
|
||||||
|
*/
|
||||||
|
public Jid getArchiveAddress() {
|
||||||
|
if (archiveAddress == null) {
|
||||||
|
EntityFullJid localJid = connection().getUser();
|
||||||
|
if (localJid == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return localJid.asBareJid();
|
||||||
|
}
|
||||||
|
return archiveAddress;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query archive with a maximum amount of results.
|
* Query archive with a maximum amount of results.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue