mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue