Browse Source

Added special statuses for service users

master
Igor Zhukov 9 years ago
parent
commit
abf2609c92
  1. 6
      app/js/filters.js
  2. 2
      app/js/locales/en-us.json

6
app/js/filters.js

@ -32,6 +32,12 @@ angular.module('myApp.filters', ['myApp.i18n'])
.filter('userStatus', function($filter, _) { .filter('userStatus', function($filter, _) {
var relativeTimeFilter = $filter('relativeTime'); var relativeTimeFilter = $filter('relativeTime');
return function (user, botChatPrivacy) { return function (user, botChatPrivacy) {
if (!(user.id % 1000)) {
if (user.id == 777000) {
return _('user_status_service_notifications');
}
return _('user_status_support');
}
var statusType = user && user.status && user.status._; var statusType = user && user.status && user.status._;
if (!statusType) { if (!statusType) {
statusType = user && user.pFlags && user.pFlags.bot ? 'userStatusBot' : 'userStatusEmpty'; statusType = user && user.pFlags && user.pFlags.bot ? 'userStatusBot' : 'userStatusEmpty';

2
app/js/locales/en-us.json

@ -167,6 +167,8 @@
"user_status_last_month": "last seen within a month", "user_status_last_month": "last seen within a month",
"user_status_long_ago": "last seen a long time ago", "user_status_long_ago": "last seen a long time ago",
"user_status_bot": "bot", "user_status_bot": "bot",
"user_status_service_notifications": "service notifications",
"user_status_support": "support",
"user_status_bot_noprivacy": "has access to messages", "user_status_bot_noprivacy": "has access to messages",
"user_status_bot_privacy": "has no access to messages", "user_status_bot_privacy": "has no access to messages",
"chat_title_deleted": "DELETED", "chat_title_deleted": "DELETED",

Loading…
Cancel
Save