1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Apply refinements and fixes to the MAM code

SMACK-625.
This commit is contained in:
Florian Schmaus 2016-07-23 15:45:45 +02:00
parent 189cac072b
commit aeb385a022
21 changed files with 194 additions and 236 deletions

View file

@ -148,6 +148,19 @@ public abstract class Stanza implements TopLevelStreamElement {
return id != null;
}
/**
* Set the stanza id if none is set.
*
* @return the stanza id.
* @since 4.2
*/
public String setStanzaId() {
if (!hasStanzaIdSet()) {
setStanzaId(StanzaIdUtil.newStanzaId());
}
return getStanzaId();
}
/**
* Returns who the stanza(/packet) is being sent "to", or <tt>null</tt> if
* the value is not set. The XMPP protocol often makes the "to"