Browse Source

Updated schema

Supported new service message actions
Improved update status
master
Igor Zhukov 9 years ago
parent
commit
1dec3c9451
  1. 6
      app/js/controllers.js
  2. 10
      app/js/directives.js
  3. 4
      app/js/locales/en-us.json
  4. 72
      app/js/messages_manager.js
  5. 21
      app/js/services.js
  6. 1
      app/less/app.less
  7. 24
      app/partials/desktop/dialog_service.html
  8. 24
      app/partials/desktop/message_service.html
  9. 24
      app/partials/mobile/message_service.html

6
app/js/controllers.js

@ -1241,7 +1241,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
AppPeersManager.isChannel(peerID) && AppPeersManager.isChannel(peerID) &&
(channel = AppChatsManager.getChat(-peerID))) { (channel = AppChatsManager.getChat(-peerID))) {
var canSend = channel.pFlags.creator || channel.pFlags.editor; var canSend = AppChatsManager.hasRights(-peerID, 'send');
if (!canSend) { if (!canSend) {
if (channel.pFlags.left) { if (channel.pFlags.left) {
$scope.historyState.channelActions = 'join'; $scope.historyState.channelActions = 'join';
@ -2217,7 +2217,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
// console.log(dT(), 'reset draft', $scope.curDialog.peer, forceDraft); // console.log(dT(), 'reset draft', $scope.curDialog.peer, forceDraft);
if (forceDraft) { if (forceDraft) {
if (forceDraft == $scope.curDialog.peer) { if (forceDraft == $scope.curDialog.peer) {
$scope.draftMessage.isBroadcast = AppPeersManager.isChannel($scope.curDialog.peerID); $scope.draftMessage.isBroadcast = AppPeersManager.isChannel($scope.curDialog.peerID) && !AppPeersManager.isMegagroup($scope.curDialog.peerID);
$scope.$broadcast('ui_peer_draft'); $scope.$broadcast('ui_peer_draft');
return; return;
} else { } else {
@ -2231,7 +2231,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
Storage.get('draft' + $scope.curDialog.peerID).then(function (draftText) { Storage.get('draft' + $scope.curDialog.peerID).then(function (draftText) {
// console.log('Restore draft', 'draft' + $scope.curDialog.peerID, draftText); // console.log('Restore draft', 'draft' + $scope.curDialog.peerID, draftText);
$scope.draftMessage.text = draftText || ''; $scope.draftMessage.text = draftText || '';
$scope.draftMessage.isBroadcast = AppPeersManager.isChannel($scope.curDialog.peerID); $scope.draftMessage.isBroadcast = AppPeersManager.isChannel($scope.curDialog.peerID) && !AppPeersManager.isMegagroup($scope.curDialog.peerID);
// console.log('send broadcast', $scope.draftMessage); // console.log('send broadcast', $scope.draftMessage);
$scope.$broadcast('ui_peer_draft'); $scope.$broadcast('ui_peer_draft');
}); });

10
app/js/directives.js

@ -2519,7 +2519,7 @@ angular.module('myApp.directives', ['myApp.filters'])
}) })
.directive('myUserStatus', function ($filter, AppUsersManager) { .directive('myUserStatus', function ($filter, $rootScope, AppUsersManager) {
var statusFilter = $filter('userStatus'), var statusFilter = $filter('userStatus'),
ind = 0, ind = 0,
@ -2527,6 +2527,13 @@ angular.module('myApp.directives', ['myApp.filters'])
setInterval(updateAll, 90000); setInterval(updateAll, 90000);
$rootScope.$on('stateSynchronized', function () {
setTimeout(function () {
updateAll();
}, 100);
});
return { return {
link: link link: link
}; };
@ -2545,6 +2552,7 @@ angular.module('myApp.directives', ['myApp.filters'])
element element
.html(statusFilter(user, attrs.botChatPrivacy)) .html(statusFilter(user, attrs.botChatPrivacy))
.toggleClass('status_online', user.status && user.status._ == 'userStatusOnline' || false); .toggleClass('status_online', user.status && user.status._ == 'userStatusOnline' || false);
// console.log(dT(), 'update status', element[0], user.status && user.status, tsNow(true), element.html());
}; };
$scope.$watch(attrs.myUserStatus, function (newUserID) { $scope.$watch(attrs.myUserStatus, function (newUserID) {

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

@ -283,11 +283,13 @@
"conversation_group_photo_removed": "removed group photo", "conversation_group_photo_removed": "removed group photo",
"conversation_returned_to_group": "returned to group", "conversation_returned_to_group": "returned to group",
"conversation_invited_user": "invited {user}", "conversation_invited_user": "invited {user}",
"conversation_invited_users": "{'one': 'invited {} user', 'other': 'invited {} users'}",
"conversation_left_group": "left group", "conversation_left_group": "left group",
"conversation_kicked_user": "removed {user}", "conversation_kicked_user": "removed {user}",
"conversation_invited_user_message": "invited user", "conversation_invited_user_message": "invited user",
"conversation_kicked_user_message": "removed user", "conversation_kicked_user_message": "removed user",
"conversation_joined_by_link": "joined group", "conversation_joined_by_link": "joined group",
"conversation_converted_to_supergroup": "upgraded to a supergroup",
"conversation_created_channel": "Channel created", "conversation_created_channel": "Channel created",
"conversation_changed_channel_name": "Channel renamed", "conversation_changed_channel_name": "Channel renamed",
"conversation_changed_channel_photo": "Channel photo updated", "conversation_changed_channel_photo": "Channel photo updated",
@ -304,12 +306,14 @@
"message_service_changed_group_photo": "changed group photo", "message_service_changed_group_photo": "changed group photo",
"message_service_removed_group_photo": "removed group photo", "message_service_removed_group_photo": "removed group photo",
"message_service_invited_user": "invited {user}", "message_service_invited_user": "invited {user}",
"message_service_invited_users": "invited {user} and {num-more} more",
"message_service_returned_to_group": "returned to group", "message_service_returned_to_group": "returned to group",
"message_service_kicked_user": "removed {user}", "message_service_kicked_user": "removed {user}",
"message_service_left_group": "left group", "message_service_left_group": "left group",
"message_service_joined_by_link": "joined group via invite link", "message_service_joined_by_link": "joined group via invite link",
"message_service_unsupported_action": "unsupported action {action}", "message_service_unsupported_action": "unsupported action {action}",
"message_service_bot_intro_header": "What can this bot do?", "message_service_bot_intro_header": "What can this bot do?",
"message_service_converted_to_supergroup": "upgraded the group to a supergroup",
"message_service_created_channel": "Channel created", "message_service_created_channel": "Channel created",
"message_service_changed_channel_name": "Channel renamed to {channel-name}", "message_service_changed_channel_name": "Channel renamed to {channel-name}",
"message_service_changed_channel_photo": "Channel photo updated", "message_service_changed_channel_photo": "Channel photo updated",

72
app/js/messages_manager.js

@ -152,9 +152,9 @@ angular.module('myApp.services')
var mid = getFullMessageID(dialog.top_message, channelID); var mid = getFullMessageID(dialog.top_message, channelID);
} else { } else {
var mid = getFullMessageID(dialog.top_important_message, channelID); var mid = getFullMessageID(dialog.top_important_message, channelID);
dialog.top_message = mid; dialog.unread_count = dialog.unread_important_count;
} }
dialog.unread_count = dialog.unread_important_count; dialog.top_message = mid;
dialog.read_inbox_max_id = getFullMessageID(dialog.read_inbox_max_id, channelID); dialog.read_inbox_max_id = getFullMessageID(dialog.read_inbox_max_id, channelID);
var message = getMessage(dialog.top_message); var message = getMessage(dialog.top_message);
@ -207,7 +207,6 @@ angular.module('myApp.services')
}, { }, {
timeout: 300 timeout: 300
}).then(function (dialogsResult) { }).then(function (dialogsResult) {
console.log('dialogs result', dialogsResult);
if (!offsetDate) { if (!offsetDate) {
TelegramMeWebService.setAuthorized(true); TelegramMeWebService.setAuthorized(true);
} }
@ -315,8 +314,10 @@ angular.module('myApp.services')
function requestHistory (inputPeer, maxID, limit, offset) { function requestHistory (inputPeer, maxID, limit, offset) {
var peerID = AppPeersManager.getPeerID(inputPeer); var peerID = AppPeersManager.getPeerID(inputPeer);
var isChannel = AppPeersManager.isChannel(peerID); var isChannel = AppPeersManager.isChannel(peerID);
var isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID);
var promise; var promise;
if (isChannel) { if (isChannel && !isMegagroup) {
promise = MtpApiManager.invokeApi('channels.getImportantHistory', { promise = MtpApiManager.invokeApi('channels.getImportantHistory', {
channel: AppChatsManager.getChannelInput(-peerID), channel: AppChatsManager.getChannelInput(-peerID),
offset_id: maxID ? getMessageLocalID(maxID) : 0, offset_id: maxID ? getMessageLocalID(maxID) : 0,
@ -1070,6 +1071,7 @@ angular.module('myApp.services')
var toPeerID = AppPeersManager.getPeerID(apiMessage.to_id); var toPeerID = AppPeersManager.getPeerID(apiMessage.to_id);
var isChannel = apiMessage.to_id._ == 'peerChannel'; var isChannel = apiMessage.to_id._ == 'peerChannel';
var channelID = isChannel ? -toPeerID : 0; var channelID = isChannel ? -toPeerID : 0;
var isBroadcast = isChannel && !AppChatsManager.isMegagroup(channelID);
var mid = getFullMessageID(apiMessage.id, channelID); var mid = getFullMessageID(apiMessage.id, channelID);
apiMessage.mid = mid; apiMessage.mid = mid;
@ -1124,19 +1126,43 @@ angular.module('myApp.services')
} }
} }
if (apiMessage.action) { if (apiMessage.action) {
if (apiMessage.action._ == 'messageActionChatEditPhoto') { switch (apiMessage.action._) {
AppPhotosManager.savePhoto(apiMessage.action.photo, mediaContext); case 'messageActionChatEditPhoto':
if (isChannel) { AppPhotosManager.savePhoto(apiMessage.action.photo, mediaContext);
apiMessage.action._ = 'messageActionChannelEditPhoto'; if (isBroadcast) {
} apiMessage.action._ = 'messageActionChannelEditPhoto';
} }
else if (isChannel) { break;
if (apiMessage.action._ == 'messageActionChatEditTitle') {
apiMessage.action._ = 'messageActionChannelEditTitle'; case 'messageActionChatEditTitle':
} if (isBroadcast) {
if (apiMessage.action._ == 'messageActionChatDeletePhoto') { apiMessage.action._ = 'messageActionChannelEditTitle';
apiMessage.action._ = 'messageActionChannelDeletePhoto'; }
} break;
case 'messageActionChatDeletePhoto':
if (isBroadcast) {
apiMessage.action._ = 'messageActionChannelDeletePhoto';
}
break;
case 'messageActionChatAddUser':
if (apiMessage.action.users.length == 1) {
apiMessage.action.user_id = apiMessage.action.users[0];
if (apiMessage.fromID == apiMessage.action.user_id) {
apiMessage.action._ = 'messageActionChatReturn';
}
}
else if (apiMessage.action.users.length > 1) {
apiMessage.action._ = 'messageActionChatAddUsers';
}
break;
case 'messageActionChatDeleteUser':
if (apiMessage.fromID == apiMessage.action.user_id) {
apiMessage.action._ = 'messageActionChatLeave';
}
break;
} }
} }
@ -1162,7 +1188,8 @@ angular.module('myApp.services')
pFlags = {}, pFlags = {},
replyToMsgID = options.replyToMsgID, replyToMsgID = options.replyToMsgID,
isChannel = AppPeersManager.isChannel(peerID), isChannel = AppPeersManager.isChannel(peerID),
asChannel = isChannel ? true : false, isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID),
asChannel = isChannel && !isMegagroup ? true : false,
entities = [], entities = [],
message; message;
@ -1303,7 +1330,8 @@ angular.module('myApp.services')
pFlags = {}, pFlags = {},
replyToMsgID = options.replyToMsgID, replyToMsgID = options.replyToMsgID,
isChannel = AppPeersManager.isChannel(peerID), isChannel = AppPeersManager.isChannel(peerID),
asChannel = isChannel ? true : false, isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID),
asChannel = isChannel && !isMegagroup ? true : false,
attachType, apiFileName, realFileName; attachType, apiFileName, realFileName;
if (!options.isMedia) { if (!options.isMedia) {
@ -1489,7 +1517,8 @@ angular.module('myApp.services')
inputPeer = AppPeersManager.getInputPeerByID(peerID), inputPeer = AppPeersManager.getInputPeerByID(peerID),
replyToMsgID = options.replyToMsgID, replyToMsgID = options.replyToMsgID,
isChannel = AppPeersManager.isChannel(peerID), isChannel = AppPeersManager.isChannel(peerID),
asChannel = isChannel ? true : false; isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID),
asChannel = isChannel && !isMegagroup ? true : false;
if (historyStorage === undefined) { if (historyStorage === undefined) {
historyStorage = historiesStorage[peerID] = {count: null, history: [], pending: []}; historyStorage = historiesStorage[peerID] = {count: null, history: [], pending: []};
@ -1622,7 +1651,8 @@ angular.module('myApp.services')
var i, mid, msgID; var i, mid, msgID;
var fromChannel = getMessageIDInfo(mids[0])[1]; var fromChannel = getMessageIDInfo(mids[0])[1];
var isChannel = AppPeersManager.isChannel(peerID); var isChannel = AppPeersManager.isChannel(peerID);
var asChannel = isChannel ? true : false; var isMegagroup = isChannel && AppPeersManager.isMegagroup(peerID);
var asChannel = isChannel && !isMegagroup ? true : false;
if (asChannel) { if (asChannel) {
flags |= 16; flags |= 16;

21
app/js/services.js

@ -442,6 +442,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
setInterval(updateUsersStatuses, 60000); setInterval(updateUsersStatuses, 60000);
$rootScope.$on('stateSynchronized', updateUsersStatuses);
return { return {
getContacts: getContacts, getContacts: getContacts,
@ -556,6 +557,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var chats = {}, var chats = {},
usernames = {}, usernames = {},
channelAccess = {}, channelAccess = {},
megagroups = {},
cachedPhotoLocations = {}; cachedPhotoLocations = {};
function saveApiChats (apiChats) { function saveApiChats (apiChats) {
@ -612,7 +614,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return false; return false;
} }
if (isChannel(id) && action == 'send') { if (isChannel(id) && action == 'send') {
if (!chat.pFlags.creator && !chat.pFlags.editor) { if (!chat.pFlags.megagroup &&
!chat.pFlags.creator &&
!chat.pFlags.editor) {
return false; return false;
} }
} }
@ -627,6 +631,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
channelAccess[id] = accessHash; channelAccess[id] = accessHash;
} }
function saveIsMegagroup (id) {
megagroups[id] = true;
}
function isChannel (id) { function isChannel (id) {
var chat = chats[id]; var chat = chats[id];
if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') || if (chat && (chat._ == 'channel' || chat._ == 'channelForbidden') ||
@ -637,6 +645,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
} }
function isMegagroup (id) { function isMegagroup (id) {
if (megagroups[id]) {
return true;
}
var chat = chats[id]; var chat = chats[id];
if (chat && chat._ == 'channel' && chat.pFlags.megagroup) { if (chat && chat._ == 'channel' && chat.pFlags.megagroup) {
return true; return true;
@ -679,7 +690,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
function getChatString (id) { function getChatString (id) {
var chat = getChat(id); var chat = getChat(id);
if (isChannel(id)) { if (isChannel(id)) {
return 'c' + id + '_' + chat.access_hash; return (isMegagroup(id) ? 's' : 'c') + id + '_' + chat.access_hash;
} }
return 'g' + id; return 'g' + id;
} }
@ -763,6 +774,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
isMegagroup: isMegagroup, isMegagroup: isMegagroup,
hasRights: hasRights, hasRights: hasRights,
saveChannelAccess: saveChannelAccess, saveChannelAccess: saveChannelAccess,
saveIsMegagroup: saveIsMegagroup,
getChatInput: getChatInput, getChatInput: getChatInput,
getChannelInput: getChannelInput, getChannelInput: getChannelInput,
getChatPhoto: getChatPhoto, getChatPhoto: getChatPhoto,
@ -787,8 +799,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
access_hash: peerParams[1] access_hash: peerParams[1]
}; };
} }
else if (firstChar == 'c') { else if (firstChar == 'c' || firstChar == 's') {
AppChatsManager.saveChannelAccess(peerParams[0], peerParams[1]); AppChatsManager.saveChannelAccess(peerParams[0], peerParams[1]);
if (firstChar == 's') {
AppChatsManager.saveIsMegagroup(peerParams[0]);
}
return { return {
_: 'inputPeerChannel', _: 'inputPeerChannel',
channel_id: peerParams[0], channel_id: peerParams[0],

1
app/less/app.less

@ -3012,6 +3012,7 @@ _:-ms-lang(x), .composer_rich_textarea:empty:focus:before {
padding: 20px 0; padding: 20px 0;
font-size: 14px; font-size: 14px;
line-height: 160%; line-height: 160%;
word-break: break-all;
} }
.confirm_phone_number { .confirm_phone_number {
font-weight: bold; font-weight: bold;

24
app/partials/desktop/dialog_service.html

@ -3,20 +3,22 @@
<span ng-switch-when="messageActionChatEditTitle" my-i18n="conversation_group_renamed"></span> <span ng-switch-when="messageActionChatEditTitle" my-i18n="conversation_group_renamed"></span>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="conversation_group_photo_updated"></span> <span ng-switch-when="messageActionChatEditPhoto" my-i18n="conversation_group_photo_updated"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="conversation_group_photo_removed"></span> <span ng-switch-when="messageActionChatDeletePhoto" my-i18n="conversation_group_photo_removed"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="::message.fromID != message.action.user_id"> <span ng-switch-when="messageActionChatJoinedByLink" my-i18n="conversation_joined_by_link"></span>
<span ng-switch-when="true" my-i18n="conversation_invited_user"> <span ng-switch-when="messageActionChatReturn" my-i18n="conversation_returned_to_group"></span>
<span ng-switch-when="messageActionChatAddUser" my-i18n="conversation_invited_user">
<my-i18n-param name="user"><span my-peer-link="message.action.user_id"></span></my-i18n-param> <my-i18n-param name="user"><span my-peer-link="message.action.user_id"></span></my-i18n-param>
</span>
<span ng-switch-default my-i18n="conversation_returned_to_group"></span>
</span> </span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="::message.fromID != message.action.user_id"> <span ng-switch-when="messageActionChatAddUsers" my-i18n="">
<span ng-switch-when="true" my-i18n="conversation_kicked_user"> <ng-pluralize count="message.action.users.length"
<my-i18n-param name="user"><span my-peer-link="message.action.user_id"></span></my-i18n-param> when="conversation_invited_users">
</span> </ng-pluralize>
<span ng-switch-default my-i18n="conversation_left_group"></span>
</span> </span>
<span ng-switch-when="messageActionChatJoinedByLink" my-i18n="conversation_joined_by_link"></span> <span ng-switch-when="messageActionChatLeave" my-i18n="conversation_left_group"></span>
<span ng-switch-when="messageActionChatDeleteUser" my-i18n="conversation_kicked_user">
<my-i18n-param name="user"><span my-peer-link="message.action.user_id"></span></my-i18n-param>
</span>
<span ng-switch-when="messageActionChatMigrateTo" my-i18n="conversation_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelMigrateFrom" my-i18n="conversation_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelCreate" my-i18n="conversation_created_channel"></span> <span ng-switch-when="messageActionChannelCreate" my-i18n="conversation_created_channel"></span>
<span ng-switch-when="messageActionChannelEditTitle" my-i18n="conversation_changed_channel_name"></span> <span ng-switch-when="messageActionChannelEditTitle" my-i18n="conversation_changed_channel_name"></span>
<span ng-switch-when="messageActionChannelEditPhoto" my-i18n="conversation_changed_channel_photo"></span> <span ng-switch-when="messageActionChannelEditPhoto" my-i18n="conversation_changed_channel_photo"></span>

24
app/partials/desktop/message_service.html

@ -6,20 +6,22 @@
</my-i18n> </my-i18n>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span> <span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span> <span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="::historyMessage.fromID != historyMessage.action.user_id"> <span ng-switch-when="messageActionChatJoinedByLink" my-i18n="message_service_joined_by_link"></span>
<span ng-switch-when="true" my-i18n="message_service_invited_user"> <span ng-switch-when="messageActionChatReturn" my-i18n="message_service_returned_to_group"></span>
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param> <span ng-switch-when="messageActionChatAddUser" my-i18n="message_service_invited_user">
</span> <my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
<span ng-switch-default my-i18n="message_service_returned_to_group"></span>
</span> </span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="::historyMessage.fromID != historyMessage.action.user_id"> <span ng-switch-when="messageActionChatAddUsers" my-i18n="message_service_invited_users">
<span ng-switch-when="true" my-i18n="message_service_kicked_user"> <my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param> <my-i18n-param name="num-more"><span ng-bind="historyMessage.action.users.length - 1"></span></my-i18n-param>
</span> </span>
<span ng-switch-default my-i18n="message_service_left_group"></span> <span ng-switch-when="messageActionChatLeave" my-i18n="message_service_left_group"></span>
<span ng-switch-when="messageActionChatDeleteUser" my-i18n="message_service_kicked_user">
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span> </span>
<span ng-switch-when="messageActionChatJoinedByLink" my-i18n="message_service_joined_by_link"></span>
<span ng-switch-when="messageActionChatMigrateTo" my-i18n="message_service_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelMigrateFrom" my-i18n="message_service_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelCreate" my-i18n="message_service_created_channel"></span> <span ng-switch-when="messageActionChannelCreate" my-i18n="message_service_created_channel"></span>
<span ng-switch-when="messageActionChannelEditTitle" my-i18n="message_service_changed_channel_name"> <span ng-switch-when="messageActionChannelEditTitle" my-i18n="message_service_changed_channel_name">
<my-i18n-param name="channel-name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param> <my-i18n-param name="channel-name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param>

24
app/partials/mobile/message_service.html

@ -6,20 +6,22 @@
</my-i18n> </my-i18n>
<span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span> <span ng-switch-when="messageActionChatEditPhoto" my-i18n="message_service_changed_group_photo"></span>
<span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span> <span ng-switch-when="messageActionChatDeletePhoto" my-i18n="message_service_removed_group_photo"></span>
<span ng-switch-when="messageActionChatAddUser" ng-switch="::historyMessage.fromID != historyMessage.action.user_id"> <span ng-switch-when="messageActionChatJoinedByLink" my-i18n="message_service_joined_by_link"></span>
<span ng-switch-when="true" my-i18n="message_service_invited_user"> <span ng-switch-when="messageActionChatReturn" my-i18n="message_service_returned_to_group"></span>
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param> <span ng-switch-when="messageActionChatAddUser" my-i18n="message_service_invited_user">
</span> <my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
<span ng-switch-default my-i18n="message_service_returned_to_group"></span>
</span> </span>
<span ng-switch-when="messageActionChatDeleteUser" ng-switch="::historyMessage.fromID != historyMessage.action.user_id"> <span ng-switch-when="messageActionChatAddUsers" my-i18n="message_service_invited_users">
<span ng-switch-when="true" my-i18n="message_service_kicked_user"> <my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param> <my-i18n-param name="num-more"><span ng-bind="historyMessage.action.users.length - 1"></span></my-i18n-param>
</span> </span>
<span ng-switch-default my-i18n="message_service_left_group"></span> <span ng-switch-when="messageActionChatLeave" my-i18n="message_service_left_group"></span>
<span ng-switch-when="messageActionChatDeleteUser" my-i18n="message_service_kicked_user">
<my-i18n-param name="user"><a my-peer-link="historyMessage.action.user_id" color="true"></a></my-i18n-param>
</span> </span>
<span ng-switch-when="messageActionChatJoinedByLink" my-i18n="message_service_joined_by_link"></span>
<span ng-switch-when="messageActionChatMigrateTo" my-i18n="message_service_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelMigrateFrom" my-i18n="message_service_converted_to_supergroup"></span>
<span ng-switch-when="messageActionChannelCreate" my-i18n="message_service_created_channel"></span> <span ng-switch-when="messageActionChannelCreate" my-i18n="message_service_created_channel"></span>
<span ng-switch-when="messageActionChannelEditTitle" my-i18n="message_service_changed_channel_name"> <span ng-switch-when="messageActionChannelEditTitle" my-i18n="message_service_changed_channel_name">
<my-i18n-param name="channel-name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param> <my-i18n-param name="channel-name">&laquo;<strong ng-bind-html="::historyMessage.action.rTitle"></strong>&raquo;</my-i18n-param>

Loading…
Cancel
Save