From f10c2194db1407262dc76f7941bb8a0fb4d8aba7 Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Thu, 27 Sep 2007 23:00:27 +0200 Subject: [PATCH] resolve MOTD not sent to offline users (when becoming available) bug darcs-hash:20070927210027-86b55-9fd0d0a01060db0ebd3f77de5893099a5c2a8728.gz --- src/jcl/jabber/command.py | 3 +-- src/jcl/jabber/tests/command.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) 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")