mirror of https://github.com/zulip/zulip.git
Replace other non-zerver uses of iPhone client
(imported from commit 0988e2c9bd0499a0711daed97f89aa672776f085)
This commit is contained in:
parent
6808b5b5fe
commit
1e7a22f14e
|
@ -8,7 +8,7 @@ from django.db.models import Count
|
|||
from zerver.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \
|
||||
Subscription, UserMessage
|
||||
|
||||
MOBILE_CLIENT_LIST = ["Android", "iPhone"]
|
||||
MOBILE_CLIENT_LIST = ["Android", "ios"]
|
||||
HUMAN_CLIENT_LIST = MOBILE_CLIENT_LIST + ["website"]
|
||||
|
||||
human_messages = Message.objects.filter(sending_client__name__in=HUMAN_CLIENT_LIST)
|
||||
|
|
|
@ -745,7 +745,7 @@ def realm_user_summary_table(all_records, admin_emails):
|
|||
sent_count = get_count(user_summary, 'send')
|
||||
cells = [user_summary['name'], email_link, sent_count]
|
||||
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)
|
||||
if field == 'use':
|
||||
if val and is_recent(val):
|
||||
|
@ -770,7 +770,7 @@ def realm_user_summary_table(all_records, admin_emails):
|
|||
'Message sent',
|
||||
'Pointer motion',
|
||||
'Desktop',
|
||||
'iPhone',
|
||||
'ios',
|
||||
'Android'
|
||||
]
|
||||
|
||||
|
|
|
@ -377,12 +377,12 @@ class WorkerTest(TestCase):
|
|||
user = get_user_profile_by_email('hamlet@zulip.com')
|
||||
UserActivity.objects.filter(
|
||||
user_profile = user.id,
|
||||
client = get_client('iPhone')
|
||||
client = get_client('ios')
|
||||
).delete()
|
||||
|
||||
data = dict(
|
||||
user_profile_id = user.id,
|
||||
client = 'iPhone',
|
||||
client = 'ios',
|
||||
time = time.time(),
|
||||
query = 'send_message'
|
||||
)
|
||||
|
@ -393,7 +393,7 @@ class WorkerTest(TestCase):
|
|||
worker.start()
|
||||
activity_records = UserActivity.objects.filter(
|
||||
user_profile = user.id,
|
||||
client = get_client('iPhone')
|
||||
client = get_client('ios')
|
||||
)
|
||||
self.assertTrue(len(activity_records), 1)
|
||||
self.assertTrue(activity_records[0].count, 1)
|
||||
|
|
Loading…
Reference in New Issue