Ignore owner property updates from the network; handled locally
This commit is contained in:
parent
bd2ff74be4
commit
d196fb89a7
@ -416,6 +416,11 @@ class ServerPlugin(gobject.GObject):
|
|||||||
self._contact_offline(handle)
|
self._contact_offline(handle)
|
||||||
|
|
||||||
def _avatar_updated_cb(self, handle, new_avatar_token):
|
def _avatar_updated_cb(self, handle, new_avatar_token):
|
||||||
|
if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
|
||||||
|
# ignore network events for Owner property changes since those
|
||||||
|
# are handled locally
|
||||||
|
return
|
||||||
|
|
||||||
jid = self._online_contacts[handle]
|
jid = self._online_contacts[handle]
|
||||||
icon = self._icon_cache.get_icon(jid, new_avatar_token)
|
icon = self._icon_cache.get_icon(jid, new_avatar_token)
|
||||||
if not icon:
|
if not icon:
|
||||||
@ -432,14 +437,23 @@ class ServerPlugin(gobject.GObject):
|
|||||||
#print "Buddy %s alias changed to %s" % (handle, alias)
|
#print "Buddy %s alias changed to %s" % (handle, alias)
|
||||||
self._buddy_properties_changed_cb(handle, prop)
|
self._buddy_properties_changed_cb(handle, prop)
|
||||||
|
|
||||||
def _buddy_properties_changed_cb(self, contact, properties):
|
def _buddy_properties_changed_cb(self, handle, properties):
|
||||||
self.emit("buddy-properties-changed", contact, properties)
|
if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
|
||||||
|
# ignore network events for Owner property changes since those
|
||||||
|
# are handled locally
|
||||||
|
return
|
||||||
|
self.emit("buddy-properties-changed", handle, properties)
|
||||||
|
|
||||||
|
def _buddy_activities_changed_cb(self, handle, activities):
|
||||||
|
if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
|
||||||
|
# ignore network events for Owner activity changes since those
|
||||||
|
# are handled locally
|
||||||
|
return
|
||||||
|
|
||||||
def _buddy_activities_changed_cb(self, contact, activities):
|
|
||||||
for act_id, act_handle in activities:
|
for act_id, act_handle in activities:
|
||||||
self._activities[act_id] = act_handle
|
self._activities[act_id] = act_handle
|
||||||
activities_id = map(lambda x: x[0], activities)
|
activities_id = map(lambda x: x[0], activities)
|
||||||
self.emit("buddy-activities-changed", contact, activities_id)
|
self.emit("buddy-activities-changed", handle, activities_id)
|
||||||
|
|
||||||
def _new_channel_cb(self, object_path, channel_type, handle_type, handle, suppress_handler):
|
def _new_channel_cb(self, object_path, channel_type, handle_type, handle, suppress_handler):
|
||||||
if handle_type == CONNECTION_HANDLE_TYPE_ROOM and channel_type == CHANNEL_TYPE_TEXT:
|
if handle_type == CONNECTION_HANDLE_TYPE_ROOM and channel_type == CHANNEL_TYPE_TEXT:
|
||||||
|
Loading…
Reference in New Issue
Block a user