diff --git a/src/jcl/jabber/command.py b/src/jcl/jabber/command.py index 45575a2..d7ba921 100644 --- a/src/jcl/jabber/command.py +++ b/src/jcl/jabber/command.py @@ -937,8 +937,7 @@ class JCLCommandManager(CommandManager): motd = session_context["motd"][0] self.component.set_motd(motd) users = account.get_all_users(\ - filter=AND(Account.q.userID == User.q.id, - Account.q._status != account.OFFLINE), + filter=AND(Account.q.userID == User.q.id), distinct=True) result = [] motd = self.component.get_motd() diff --git a/src/jcl/jabber/tests/command.py b/src/jcl/jabber/tests/command.py index 1d815a2..2da4f19 100644 --- a/src/jcl/jabber/tests/command.py +++ b/src/jcl/jabber/tests/command.py @@ -2536,6 +2536,7 @@ class JCLCommandManager_TestCase(JCLTestCase): jid="account12@jcl.test.com") account12.status = "away" user2 = User(jid="test2@test.com") + user2.has_received_motd = True account21 = ExampleAccount(user=user2, name="account21", jid="account21@jcl.test.com")