Commit d06b73d7 authored by Philipp Hörist's avatar Philipp Hörist

Rename some muc events

parent e1c17d75
......@@ -330,7 +330,7 @@ class MUC:
contact.status = properties.subject
app.nec.push_incoming_event(
NetworkEvent('gc-subject-received',
NetworkEvent('muc-subject',
account=self._account,
jid=jid,
subject=properties.subject,
......@@ -348,7 +348,7 @@ class MUC:
return
app.nec.push_incoming_event(
NetworkEvent('voice-approval',
NetworkEvent('muc-voice-approval',
account=self._account,
jid=jid,
form=properties.voice_request.form))
......@@ -367,7 +367,7 @@ class MUC:
store_bob_data(properties.captcha.bob_data)
app.nec.push_incoming_event(
NetworkEvent('captcha-challenge',
NetworkEvent('muc-captcha-challenge',
account=self._account,
jid=properties.jid,
form=properties.captcha.form))
......@@ -380,7 +380,7 @@ class MUC:
log.info('Received config change: %s %s',
properties.jid, properties.muc_status_codes)
app.nec.push_incoming_event(
NetworkEvent('gc-config-changed-received',
NetworkEvent('muc-config-changed',
account=self._account,
jid=properties.jid,
status_codes=properties.muc_status_codes))
......@@ -396,7 +396,7 @@ class MUC:
data.from_, data.reason)
app.nec.push_incoming_event(
NetworkEvent('gc-decline-received',
NetworkEvent('muc-decline',
account=self._account,
**data._asdict()))
raise nbxmpp.NodeProcessed
......@@ -414,7 +414,7 @@ class MUC:
raise nbxmpp.NodeProcessed
app.nec.push_incoming_event(
NetworkEvent('gc-invitation-received',
NetworkEvent('muc-invitation',
account=self._account,
**data._asdict()))
raise nbxmpp.NodeProcessed
......@@ -444,7 +444,7 @@ class MUC:
return
app.nec.push_incoming_event(NetworkEvent(
'muc-owner-received',
'muc-config',
conn=self._con,
dataform=result.form,
jid=result.jid))
......
......@@ -321,20 +321,20 @@ class GroupchatControl(ChatControlBase):
('muc-user-affiliation-changed', ged.GUI1, self._on_affiliation_changed),
('muc-user-status-show-changed', ged.GUI1, self._on_status_show_changed),
('muc-user-role-changed', ged.GUI1, self._on_role_changed),
('muc-destroyed', ged.GUI1, self._on_muc_destroyed),
('muc-presence-error', ged.GUI1, self._on_muc_presence_error),
('muc-destroyed', ged.GUI1, self._on_destroyed),
('muc-presence-error', ged.GUI1, self._on_presence_error),
('muc-config-changed', ged.GUI1, self._on_config_changed),
('muc-subject', ged.GUI1, self._on_subject),
('muc-captcha-challenge', ged.GUI1, self._on_captcha_challenge),
('muc-voice-approval', ged.GUI1, self._on_voice_approval),
('gc-message-received', ged.GUI1, self._nec_gc_message_received),
('mam-decrypted-message-received', ged.GUI1, self._nec_mam_decrypted_message_received),
('vcard-published', ged.GUI1, self._nec_vcard_published),
('update-gc-avatar', ged.GUI1, self._nec_update_avatar),
('update-room-avatar', ged.GUI1, self._nec_update_room_avatar),
('gc-subject-received', ged.GUI1, self._nec_gc_subject_received),
('gc-config-changed-received', ged.GUI1, self._nec_gc_config_changed_received),
('signed-in', ged.GUI1, self._nec_signed_in),
('decrypted-message-received', ged.GUI2, self._nec_decrypted_message_received),
('gc-stanza-message-outgoing', ged.OUT_POSTCORE, self._message_sent),
('captcha-challenge', ged.GUI1, self._on_captcha_challenge),
('voice-approval', ged.GUI1, self._on_voice_approval),
]
for handler in self._event_handlers:
......@@ -1441,7 +1441,7 @@ class GroupchatControl(ChatControlBase):
self.subject = subject
self.draw_banner_text()
def _nec_gc_subject_received(self, event):
def _on_subject(self, event):
if event.account != self.account:
return
if event.jid != self.room_jid:
......@@ -1467,7 +1467,7 @@ class GroupchatControl(ChatControlBase):
else:
self.subject_button.show()
def _nec_gc_config_changed_received(self, event):
def _on_config_changed(self, event):
# http://www.xmpp.org/extensions/xep-0045.html#roomconfig-notify
if event.account != self.account:
return
......@@ -2060,7 +2060,7 @@ class GroupchatControl(ChatControlBase):
self.print_conversation(_('%s has joined the group chat') % nick,
graphics=False)
def _on_muc_presence_error(self, event):
def _on_presence_error(self, event):
if event.account != self.account:
return
if event.room_jid != self.room_jid:
......@@ -2158,7 +2158,7 @@ class GroupchatControl(ChatControlBase):
if self.is_continued:
self.draw_banner_text()
def _on_muc_destroyed(self, event):
def _on_destroyed(self, event):
if event.account != self.account:
return
if event.room_jid != self.room_jid:
......
......@@ -1392,8 +1392,8 @@ class Interface:
'connection-lost': [self.handle_event_connection_lost],
'file-request-error': [self.handle_event_file_request_error],
'file-request-received': [self.handle_event_file_request],
'gc-invitation-received': [self.handle_event_gc_invitation],
'gc-decline-received': [self.handle_event_gc_decline],
'muc-invitation': [self.handle_event_gc_invitation],
'muc-decline': [self.handle_event_gc_decline],
'gpg-password-required': [self.handle_event_gpg_password_required],
'gpg-trust-key': [self.handle_event_gpg_trust_key],
'http-auth-received': [self.handle_event_http_auth],
......@@ -1411,7 +1411,7 @@ class Interface:
'message-not-sent': [self.handle_event_msgnotsent],
'message-sent': [self.handle_event_msgsent],
'metacontacts-received': [self.handle_event_metacontacts],
'muc-owner-received': [self.handle_event_gc_config],
'muc-config': [self.handle_event_gc_config],
'our-show': [self.handle_event_status],
'password-required': [self.handle_event_password_required],
'plain-connection': [self.handle_event_plain_connection],
......
......@@ -2677,7 +2677,7 @@ class RosterWindow:
app.log('avatar').debug('Draw roster avatar: %s', obj.jid)
self.draw_avatar(obj.jid, obj.account)
def _nec_gc_subject_received(self, event):
def _nec_muc_subject_received(self, event):
self.draw_contact(event.jid, event.account)
def _nec_metacontacts_received(self, obj):
......@@ -5861,8 +5861,8 @@ class RosterWindow:
self._nec_update_avatar)
app.ged.register_event_handler('update-room-avatar', ged.GUI1,
self._nec_update_avatar)
app.ged.register_event_handler('gc-subject-received', ged.GUI1,
self._nec_gc_subject_received)
app.ged.register_event_handler('muc-subject', ged.GUI1,
self._nec_muc_subject_received)
app.ged.register_event_handler('metacontacts-received', ged.GUI2,
self._nec_metacontacts_received)
app.ged.register_event_handler('signed-in', ged.GUI1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment