mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Twitter: Stop supporting Twitter sessions starting on february 9
This commit is contained in:
parent
a8c5fc8589
commit
f69af7aaa1
@ -2,7 +2,7 @@ TWBlue Changelog
|
|||||||
|
|
||||||
## changes in this version
|
## changes in this version
|
||||||
|
|
||||||
In this version, TWBlue will no longer support Twitter sessions starting on February 9, due to Twitter's policies prohibiting third-party clients, in addition to the shutdown of the free access to the Twitter API. All Twitter sessions that are active on TWBlue will stop working as of February 9, when the free API access will finally be shut down. From the TWBlue team, we will continue working to improve our support for Mastodon instances and add other social networks in the near future. If you want to keep in touch with the project, you can follow us in our mastodon account, at [@twblue@maaw.social.](https://maaw.social/@twblue)
|
In this version, TWBlue will no longer support Twitter sessions starting on February 9, due to Twitter's policies prohibiting third-party clients, in addition to the shutdown of the free access to the Twitter API. All Twitter sessions that are active on TWBlue will stop working as of February 9, when the free API access will finally be shut down. It will not be possible to display or add Twitter sessions from the Session manager. From the TWBlue team, we will continue working to improve our support for Mastodon instances and add other social networks in the near future. If you want to keep in touch with the project, you can follow us in our mastodon account, at [@twblue@maaw.social.](https://maaw.social/@twblue)
|
||||||
|
|
||||||
* In the graphical interface, TWBlue will update menu items, in the menu bar, depending on whether you are focusing a Twitter or Mastodon session. This makes it possible for TWBlue to display the correct terms in each social network. Take into account that there might be unavailable items for the currently active session.
|
* In the graphical interface, TWBlue will update menu items, in the menu bar, depending on whether you are focusing a Twitter or Mastodon session. This makes it possible for TWBlue to display the correct terms in each social network. Take into account that there might be unavailable items for the currently active session.
|
||||||
* in the keystroke editor for the invisible interface, TWBlue displays the available shortcuts for the currently active session. Descriptions of those keystrokes are also different for Twitter and mastodon sessions to use correct terms for both networks.
|
* in the keystroke editor for the invisible interface, TWBlue displays the available shortcuts for the currently active session. Descriptions of those keystrokes are also different for Twitter and mastodon sessions to use correct terms for both networks.
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
# Make date check for feb 9.
|
||||||
|
now = datetime.datetime.now()
|
||||||
|
end_of_twitter = datetime.datetime(2023, 2, 9)
|
||||||
|
twitter_support_enabled = True
|
||||||
|
if now >= end_of_twitter:
|
||||||
|
twitter_support_enabled = False
|
||||||
name = 'TWBlue'
|
name = 'TWBlue'
|
||||||
short_name='twblue'
|
short_name='twblue'
|
||||||
update_url = 'https://twblue.es/updates/updates.php'
|
update_url = 'https://twblue.es/updates/updates.php'
|
||||||
|
@ -10,6 +10,7 @@ import output
|
|||||||
import paths
|
import paths
|
||||||
import config_utils
|
import config_utils
|
||||||
import config
|
import config
|
||||||
|
import application
|
||||||
from pubsub import pub
|
from pubsub import pub
|
||||||
from tweepy.errors import TweepyException
|
from tweepy.errors import TweepyException
|
||||||
from controller import settings
|
from controller import settings
|
||||||
@ -66,6 +67,8 @@ class sessionManagerController(object):
|
|||||||
os.exception("Exception thrown while removing malformed session")
|
os.exception("Exception thrown while removing malformed session")
|
||||||
continue
|
continue
|
||||||
if config_test.get("twitter") != None:
|
if config_test.get("twitter") != None:
|
||||||
|
if application.twitter_support_enabled == False:
|
||||||
|
continue
|
||||||
name = _("{account_name} (Twitter)").format(account_name=config_test["twitter"]["user_name"])
|
name = _("{account_name} (Twitter)").format(account_name=config_test["twitter"]["user_name"])
|
||||||
if config_test["twitter"]["user_key"] != "" and config_test["twitter"]["user_secret"] != "":
|
if config_test["twitter"]["user_key"] != "" and config_test["twitter"]["user_secret"] != "":
|
||||||
sessionsList.append(name)
|
sessionsList.append(name)
|
||||||
@ -99,6 +102,8 @@ class sessionManagerController(object):
|
|||||||
continue
|
continue
|
||||||
# Create the session object based in session type.
|
# Create the session object based in session type.
|
||||||
if i.get("type") == "twitter":
|
if i.get("type") == "twitter":
|
||||||
|
if application.twitter_support_enabled == False:
|
||||||
|
continue
|
||||||
s = TwitterSession.Session(i.get("id"))
|
s = TwitterSession.Session(i.get("id"))
|
||||||
elif i.get("type") == "mastodon":
|
elif i.get("type") == "mastodon":
|
||||||
s = MastodonSession.Session(i.get("id"))
|
s = MastodonSession.Session(i.get("id"))
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
""" Base GUI (Wx) class for the Session manager module."""
|
""" Base GUI (Wx) class for the Session manager module."""
|
||||||
import wx
|
import wx
|
||||||
|
import application
|
||||||
from pubsub import pub
|
from pubsub import pub
|
||||||
from multiplatform_widgets import widgets
|
from multiplatform_widgets import widgets
|
||||||
|
|
||||||
@ -50,9 +51,10 @@ class sessionManagerWindow(wx.Dialog):
|
|||||||
|
|
||||||
def on_new_account(self, *args, **kwargs):
|
def on_new_account(self, *args, **kwargs):
|
||||||
menu = wx.Menu()
|
menu = wx.Menu()
|
||||||
|
if application.twitter_support_enabled:
|
||||||
twitter = menu.Append(wx.ID_ANY, _("Twitter"))
|
twitter = menu.Append(wx.ID_ANY, _("Twitter"))
|
||||||
mastodon = menu.Append(wx.ID_ANY, _("Mastodon"))
|
|
||||||
menu.Bind(wx.EVT_MENU, self.on_new_twitter_account, twitter)
|
menu.Bind(wx.EVT_MENU, self.on_new_twitter_account, twitter)
|
||||||
|
mastodon = menu.Append(wx.ID_ANY, _("Mastodon"))
|
||||||
menu.Bind(wx.EVT_MENU, self.on_new_mastodon_account, mastodon)
|
menu.Bind(wx.EVT_MENU, self.on_new_mastodon_account, mastodon)
|
||||||
self.PopupMenu(menu, self.new.GetPosition())
|
self.PopupMenu(menu, self.new.GetPosition())
|
||||||
|
|
||||||
@ -64,6 +66,8 @@ class sessionManagerWindow(wx.Dialog):
|
|||||||
pub.sendMessage("sessionmanager.new_account", type="mastodon")
|
pub.sendMessage("sessionmanager.new_account", type="mastodon")
|
||||||
|
|
||||||
def on_new_twitter_account(self, *args, **kwargs):
|
def on_new_twitter_account(self, *args, **kwargs):
|
||||||
|
if application.twitter_support_enabled == False:
|
||||||
|
return
|
||||||
dlg = wx.MessageDialog(self, _(u"The request to authorize your Twitter account will be opened in your browser. You only need to do this once. Would you like to continue?"), _(u"Authorization"), wx.YES_NO)
|
dlg = wx.MessageDialog(self, _(u"The request to authorize your Twitter account will be opened in your browser. You only need to do this once. Would you like to continue?"), _(u"Authorization"), wx.YES_NO)
|
||||||
response = dlg.ShowModal()
|
response = dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user