From acb740b0f0d3ef569027c84e1a348338ebd69138 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Fri, 11 Dec 2009 18:35:12 -0200 Subject: [PATCH] Missing repost() in top level Networks --- mitterlib/network/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mitterlib/network/__init__.py b/mitterlib/network/__init__.py index bd0a412..fc78e74 100644 --- a/mitterlib/network/__init__.py +++ b/mitterlib/network/__init__.py @@ -168,9 +168,16 @@ class Networks(object): # If you pass a NetworkData object, we get the proper network network = reply_to.network + results = [] for shortcut in self._targets(network): - self.networks[shortcut].update(status, reply_to) - return None + results.append(self.networks[shortcut].update(status, reply_to)) + return results + + def repost(self, message): + """Repost a message in the user's timeline. The network used is + the same in the message.""" + self.networks[message.network].repost(message) + return def delete_message(self, message, network=None): """Delete an update. Message can be a NetworkData object, in which @@ -189,7 +196,7 @@ class Networks(object): data = self.networks[network].message(message_id) data.network = network - return data + return data def replies(self, network=None): """Return a list of NetworkData objects for the replies for the user