From ac20ced5fa2d718c4eb74447731ed65642754c56 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 3 Jun 2020 12:32:01 -0500 Subject: [PATCH] Expand URL in user profiles. Closes #275 --- doc/changelog.md | 3 ++- src/controller/user.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/changelog.md b/doc/changelog.md index ee0bd210..734e6c10 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -6,7 +6,8 @@ * TWBlue has been migrated completely to Python 3 (currently, the software builds with Python 3.7). * TWBlue should be restarted gracefully. Before, the application was alerting users of not being closed properly every time the application restarted by itself. * If TWBlue attemps to load an account with invalid tokens (this happens when reactivating a previously deactivated account, or when access to the ap is revoqued), TWBlue will inform the user about this error and will skip the account. Before, the app was unable to start due to a critical error. ([#328,](https://github.com/manuelcortez/TWBlue/issues/328)) -* When sending a direct message, the title of the window will change appropiately when the recipient is edited. ((#276,)[https://github.com/manuelcortez/TWBlue/issues/276]) +* When sending a direct message, the title of the window will change appropiately when the recipient is edited. ([#276,](https://github.com/manuelcortez/TWBlue/issues/276)) +* URL'S in user profiles are expanded automatically. ([#275,](https://github.com/manuelcortez/TWBlue/issues/275)) ## Changes in version 0.95 diff --git a/src/controller/user.py b/src/controller/user.py index 6149a1bc..8766a890 100644 --- a/src/controller/user.py +++ b/src/controller/user.py @@ -92,14 +92,13 @@ class profileController(object): output.speak(u"Error %s. %s" % (e.error_code, e.msg)) def get_user_info(self): - string = u"" string = string + _(u"Username: @%s\n") % (self.data["screen_name"]) string = string + _(u"Name: %s\n") % (self.data["name"]) if self.data["location"] != "": string = string + _(u"Location: %s\n") % (self.data["location"]) if self.data["url"] != None: - string = string+ _(u"URL: %s\n") % (self.data["url"]) + string = string+ _(u"URL: %s\n") % (self.data["entities"]["url"]["urls"][0]["expanded_url"]) if self.data["description"] != "": string = string+ _(u"Bio: %s\n") % (self.data["description"]) if self.data["protected"] == True: protected = _(u"Yes")