From 8172e19a3bd2cf260a7d00daa391bdf3cf819013 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sat, 18 May 2013 22:55:47 +0200 Subject: [PATCH] [Win] Use custom user-agent for facebook. Fixes facebook chat. See #867 --- src/lib/other/useragentmanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/other/useragentmanager.cpp b/src/lib/other/useragentmanager.cpp index e5ada058f..600eaeae2 100644 --- a/src/lib/other/useragentmanager.cpp +++ b/src/lib/other/useragentmanager.cpp @@ -53,6 +53,13 @@ QString UserAgentManager::userAgentForUrl(const QUrl &url) const { const QString &host = url.host(); +#ifdef Q_OS_WIN + // Facebook chat is not working with default user-agent + if (host == QLatin1String("facebook.com")) { + return "Mozilla/5.0 (Windows XP) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7"; + } +#endif + if (m_usePerDomainUserAgent) { QHashIterator i(m_userAgentsList); while (i.hasNext()) {