mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Now user action events are announced in the events buffer
This commit is contained in:
parent
a0f5a3c134
commit
a592f747f8
@ -1012,15 +1012,16 @@ class Controller(object):
|
||||
if "followers" not in buffer.session.settings["other_buffers"]["muted_buffers"]:
|
||||
self.notify(buffer.session, play_sound=play_sound)
|
||||
buffer.add_new_item(data)
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=buffer.session)
|
||||
|
||||
def manage_friend(self, data, user):
|
||||
buffer = self.search_buffer("friends", user)
|
||||
buffer.add_new_item(data)
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=buffer.session)
|
||||
|
||||
def manage_unfollowing(self, item, user):
|
||||
buffer = self.search_buffer("friends", user)
|
||||
buffer.remove_item(item)
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=buffer.session)
|
||||
|
||||
def manage_favourite(self, data, user):
|
||||
buffer = self.search_buffer("favourites", user)
|
||||
@ -1036,10 +1037,12 @@ class Controller(object):
|
||||
def manage_blocked_user(self, data, user):
|
||||
buffer = self.search_buffer("blocked", user)
|
||||
buffer.add_new_item(data)
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=buffer.session)
|
||||
|
||||
def manage_unblocked_user(self, item, user):
|
||||
buffer = self.search_buffer("blocked", user)
|
||||
buffer.remove_item(item)
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=buffer.session)
|
||||
|
||||
def manage_item_in_timeline(self, data, user, who):
|
||||
buffer = self.search_buffer("%s-timeline" % (who,), user)
|
||||
|
@ -24,7 +24,6 @@ class userActionsController(object):
|
||||
def follow(self, user):
|
||||
try:
|
||||
self.session.twitter.twitter.create_friendship(screen_name=user )
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=self.session)
|
||||
except TwythonError as err:
|
||||
output.speak("Error %s: %s" % (err.error_code, err.msg), True)
|
||||
|
||||
@ -37,14 +36,12 @@ class userActionsController(object):
|
||||
def mute(self, user):
|
||||
try:
|
||||
id = self.session.twitter.twitter.create_mute(screen_name=user )
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=self.session)
|
||||
except TwythonError as err:
|
||||
output.speak("Error %s: %s" % (err.error_code, err.msg), True)
|
||||
|
||||
def unmute(self, user):
|
||||
try:
|
||||
id = self.session.twitter.twitter.destroy_mute(screen_name=user )
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=self.session)
|
||||
except TwythonError as err:
|
||||
output.speak("Error %s: %s" % (err.error_code, err.msg), True)
|
||||
|
||||
@ -57,14 +54,12 @@ class userActionsController(object):
|
||||
def block(self, user):
|
||||
try:
|
||||
id = self.session.twitter.twitter.create_block(screen_name=user )
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=self.session)
|
||||
except TwythonError as err:
|
||||
output.speak("Error %s: %s" % (err.error_code, err.msg), True)
|
||||
|
||||
def unblock(self, user):
|
||||
try:
|
||||
id = self.session.twitter.twitter.destroy_block(screen_name=user )
|
||||
pub.sendMessage("restart-streams", streams=["main_stream"], session=self.session)
|
||||
except TwythonError as err:
|
||||
output.speak("Error %s: %s" % (err.error_code, err.msg), True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user