diff --git a/src/sessionmanager/session.py b/src/sessionmanager/session.py index 8a3ad8c9..97429173 100644 --- a/src/sessionmanager/session.py +++ b/src/sessionmanager/session.py @@ -530,4 +530,12 @@ class Session(object): if "@%s" % (i["screen_name"]) not in tweet["message"] and i["screen_name"] != tweet["user"]["screen_name"]: if tweet.has_key("retweeted_status") and tweet["retweeted_status"]["user"]["screen_name"] == i["screen_name"]: continue - return tweet \ No newline at end of file + return tweet + + def get_user(self, id): + if self.db.has_key("users") == False or self.db["users"].has_key(id) == False: + user = self.twitter.twitter.show_user(id=id) + self.db["users"][user["id"]] = user + return user + else: + return self.db["users"][id] \ No newline at end of file