Skip to content

[core] Presence: add isActive() to check if user is online and can answer#693

Open
stokito wants to merge 1 commit intoigniterealtime:masterfrom
stokito:presence_active
Open

[core] Presence: add isActive() to check if user is online and can answer#693
stokito wants to merge 1 commit intoigniterealtime:masterfrom
stokito:presence_active

Conversation

@stokito
Copy link
Member

@stokito stokito commented Jan 27, 2026

The Spark has many places where we need to determine if user is currently online i.e. its status is available or free for chat.
There is even a separate method for this:
https://github.com/igniterealtime/Spark/blob/a64185ad3b4527f764dff680686fc262af48cac1/core/src/main/java/org/jivesoftware/spark/PresenceManager.java#L148
Still there are places in code where to detect it a user is active manually like this:

usersPresence.isAvailable() && !usersPresence.isAway()

I would like to propose a separate method isActive to simplify usage.

…swer

Co-authored-by: Florian Schmaus <flo@geekplace.eu>
@stokito
Copy link
Member Author

stokito commented Feb 14, 2026

I applied your suggestions and squashed into a single commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants