Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

unsupported media alt link based on device #2065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ angular.module('myApp.directives', ['myApp.filters'])
'media': '=myMessageMedia',
'messageId': '=messageId'
},
templateUrl: templateUrl('message_media')
templateUrl: templateUrl('message_media'),
link: function ($scope, element, attrs) {
$scope.domain = Config.Navigator.osX ? 'macos.telegram.org' : (Config.Navigator.mobile ? 'telegram.org/apps' : 'desktop.telegram.org')
}
}
})
.directive('myMessagePhoto', function (AppPhotosManager) {
Expand Down
2 changes: 1 addition & 1 deletion app/partials/desktop/message_media.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div ng-switch-when="messageMediaUnsupported">
<div class="im_message_text" my-i18n="message_attach_unsupported_desktop">
<my-i18n-param name="link"><a href="https://getdesktop.telegram.org" target="_blank">getdesktop.telegram.org</a></my-i18n-param>
<my-i18n-param name="link"><a href="https://{{domain}}" target="_blank">{{domain}}</a></my-i18n-param>
</div>
</div>

Expand Down