Class UserPresenceUpdate
- java.lang.Object
-
- io.github.ma1uta.matrix.server.model.federation.edu.content.nested.UserPresenceUpdate
-
public class UserPresenceUpdate extends Object
User presence update.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserPresenceUpdate.PresencePresence statuses.
-
Field Summary
Fields Modifier and Type Field Description private BooleancurrentlyActiveTrue if the user is likely to be interacting with their client.private LonglastActiveAgoRequired.private StringpresenceRequired.private StringstatusMsgAn optional description to accompany the presence.private StringuserIdRequired.
-
Constructor Summary
Constructors Constructor Description UserPresenceUpdate()
-
Method Summary
Modifier and Type Method Description BooleangetCurrentlyActive()LonggetLastActiveAgo()StringgetPresence()StringgetStatusMsg()StringgetUserId()voidsetCurrentlyActive(Boolean currentlyActive)voidsetLastActiveAgo(Long lastActiveAgo)voidsetPresence(String presence)voidsetStatusMsg(String statusMsg)voidsetUserId(String userId)
-
-
-
Field Detail
-
userId
private String userId
Required. The user ID this presence EDU is for.
-
presence
private String presence
Required. The presence of the user. One of: ["offline", "unavailable", "online"]
-
statusMsg
private String statusMsg
An optional description to accompany the presence.
-
lastActiveAgo
private Long lastActiveAgo
Required. The number of milliseconds that have elapsed since the user last did something.
-
currentlyActive
private Boolean currentlyActive
True if the user is likely to be interacting with their client. This may be indicated by the user having a last_active_ago within the last few minutes. Defaults to false.
-
-
Method Detail
-
getUserId
public String getUserId()
-
setUserId
public void setUserId(String userId)
-
getPresence
public String getPresence()
-
setPresence
public void setPresence(String presence)
-
getStatusMsg
public String getStatusMsg()
-
setStatusMsg
public void setStatusMsg(String statusMsg)
-
getLastActiveAgo
public Long getLastActiveAgo()
-
setLastActiveAgo
public void setLastActiveAgo(Long lastActiveAgo)
-
getCurrentlyActive
public Boolean getCurrentlyActive()
-
setCurrentlyActive
public void setCurrentlyActive(Boolean currentlyActive)
-
-