Replace other non-zerver uses of iPhone client

(imported from commit 0988e2c9bd0499a0711daed97f89aa672776f085)
This commit is contained in:
Leo Franchi
2013-12-03 14:31:47 -05:00
parent 6808b5b5fe
commit 1e7a22f14e
3 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ from django.db.models import Count
from zerver.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \ from zerver.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \
Subscription, UserMessage Subscription, UserMessage
MOBILE_CLIENT_LIST = ["Android", "iPhone"] MOBILE_CLIENT_LIST = ["Android", "ios"]
HUMAN_CLIENT_LIST = MOBILE_CLIENT_LIST + ["website"] HUMAN_CLIENT_LIST = MOBILE_CLIENT_LIST + ["website"]
human_messages = Message.objects.filter(sending_client__name__in=HUMAN_CLIENT_LIST) human_messages = Message.objects.filter(sending_client__name__in=HUMAN_CLIENT_LIST)

View File

@@ -745,7 +745,7 @@ def realm_user_summary_table(all_records, admin_emails):
sent_count = get_count(user_summary, 'send') sent_count = get_count(user_summary, 'send')
cells = [user_summary['name'], email_link, sent_count] cells = [user_summary['name'], email_link, sent_count]
row_class = '' row_class = ''
for field in ['use', 'send', 'pointer', 'desktop', 'iPhone', 'Android']: for field in ['use', 'send', 'pointer', 'desktop', 'ios', 'Android']:
val = get_last_visit(user_summary, field) val = get_last_visit(user_summary, field)
if field == 'use': if field == 'use':
if val and is_recent(val): if val and is_recent(val):
@@ -770,7 +770,7 @@ def realm_user_summary_table(all_records, admin_emails):
'Message sent', 'Message sent',
'Pointer motion', 'Pointer motion',
'Desktop', 'Desktop',
'iPhone', 'ios',
'Android' 'Android'
] ]

View File

@@ -377,12 +377,12 @@ class WorkerTest(TestCase):
user = get_user_profile_by_email('hamlet@zulip.com') user = get_user_profile_by_email('hamlet@zulip.com')
UserActivity.objects.filter( UserActivity.objects.filter(
user_profile = user.id, user_profile = user.id,
client = get_client('iPhone') client = get_client('ios')
).delete() ).delete()
data = dict( data = dict(
user_profile_id = user.id, user_profile_id = user.id,
client = 'iPhone', client = 'ios',
time = time.time(), time = time.time(),
query = 'send_message' query = 'send_message'
) )
@@ -393,7 +393,7 @@ class WorkerTest(TestCase):
worker.start() worker.start()
activity_records = UserActivity.objects.filter( activity_records = UserActivity.objects.filter(
user_profile = user.id, user_profile = user.id,
client = get_client('iPhone') client = get_client('ios')
) )
self.assertTrue(len(activity_records), 1) self.assertTrue(len(activity_records), 1)
self.assertTrue(activity_records[0].count, 1) self.assertTrue(activity_records[0].count, 1)