mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Make Presence.getMode() return available if null
This commit is contained in:
parent
4013c68584
commit
5c16fdb017
1 changed files with 4 additions and 3 deletions
|
@ -180,13 +180,14 @@ public final class Presence extends Packet {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the mode of the presence update, or <tt>null</tt> if the mode is not set.
|
||||
* A null presence mode value is interpreted to be the same thing as
|
||||
* {@link Presence.Mode#available}.
|
||||
* Returns the mode of the presence update.
|
||||
*
|
||||
* @return the mode.
|
||||
*/
|
||||
public Mode getMode() {
|
||||
if (mode == null) {
|
||||
return Mode.available;
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue