Supported bot modal actions
This commit is contained in:
parent
44dab48739
commit
f16ce54ae5
app
@ -2593,6 +2593,13 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
});
|
||||
};
|
||||
|
||||
$scope.sendCommand = function (command) {
|
||||
AppMessagesManager.sendText($scope.userID, '/' + command);
|
||||
$rootScope.$broadcast('history_focus', {
|
||||
peerString: peerString
|
||||
});
|
||||
};
|
||||
|
||||
$scope.toggleBlock = function (block) {
|
||||
MtpApiManager.invokeApi(block ? 'contacts.block' : 'contacts.unblock', {
|
||||
id: AppUsersManager.getUserInput($scope.userID)
|
||||
|
@ -119,6 +119,8 @@
|
||||
"user_modal_info": "Info",
|
||||
"user_modal_phone": "Phone",
|
||||
"user_modal_about": "About",
|
||||
"user_modal_bot_settings": "Settings",
|
||||
"user_modal_bot_help": "Help",
|
||||
"user_modal_username": "Username",
|
||||
"user_modal_settings": "Settings",
|
||||
"user_modal_notifications": "Notifications",
|
||||
|
@ -73,6 +73,14 @@
|
||||
<a class="md_modal_section_link" ng-click="inviteToGroup()" my-i18n="user_modal_add_to_group"></a>
|
||||
</div>
|
||||
|
||||
<div class="md_modal_section_link_wrap" ng-if="bot_info.commands.settings != null">
|
||||
<a class="md_modal_section_link" ng-click="sendCommand('settings')" my-i18n="user_modal_bot_settings"></a>
|
||||
</div>
|
||||
|
||||
<div class="md_modal_section_link_wrap" ng-if="bot_info.commands.help != null">
|
||||
<a class="md_modal_section_link" ng-click="sendCommand('help')" my-i18n="user_modal_bot_help"></a>
|
||||
</div>
|
||||
|
||||
<div class="md_modal_section_link_wrap" ng-if="user.phone.length > 0 && !user.pFlags.contact && !user.pFlags.self">
|
||||
<a class="md_modal_section_link" ng-click="importContact()" my-i18n="user_modal_add_contact"></a>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user