cask "telegram" do version "11.13,273693" sha256 "4b642f0d45f23240ddcfca4f19ec8c3e2f7d94abce137f746b02dc29992679e0" url "https://osx.telegram.org/updates/Telegram-#{version.csv.first}.#{version.csv.second}.app.zip" name "Telegram for macOS" desc "Messaging app with a focus on speed and security" homepage "https://macos.telegram.org/" # The sparkle feed uses incorrect pubDate values, so it's necessary to # work with all of the items in the feed (not just the newest one). livecheck do url "https://osx.telegram.org/updates/versions.xml" strategy :sparkle do |items| items.map(&:nice_version) end end auto_updates true depends_on macos: ">= :high_sierra" app "Telegram.app" uninstall quit: "ru.keepcoder.Telegram" zap trash: [ "~/Library/Application Scripts/*.ru.keepcoder.Telegram", "~/Library/Application Scripts/*.ru.keepcoder.Telegram.TelegramShare", "~/Library/Application Scripts/ru.keepcoder.Telegram", "~/Library/Application Scripts/ru.keepcoder.Telegram.TelegramShare", "~/Library/Application Support/ru.keepcoder.Telegram", "~/Library/Caches/com.plausiblelabs.crashreporter.data/ru.keepcoder.Telegram", "~/Library/Caches/ru.keepcoder.Telegram", "~/Library/Containers/ru.keepcoder.Telegram", "~/Library/Containers/ru.keepcoder.Telegram.TelegramShare", "~/Library/Cookies/ru.keepcoder.Telegram.binarycookies", "~/Library/Group Containers/*.ru.keepcoder.Telegram", "~/Library/Group Containers/*.ru.keepcoder.Telegram.TelegramShare", "~/Library/HTTPStorages/ru.keepcoder.Telegram", "~/Library/Preferences/ru.keepcoder.Telegram.plist", "~/Library/Saved Application State/ru.keepcoder.Telegram.savedState", ] end