Rename some muc events
This commit is contained in:
parent
e1c17d752e
commit
d06b73d7c6
4 changed files with 23 additions and 23 deletions
|
@ -330,7 +330,7 @@ class MUC:
|
||||||
contact.status = properties.subject
|
contact.status = properties.subject
|
||||||
|
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('gc-subject-received',
|
NetworkEvent('muc-subject',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
jid=jid,
|
jid=jid,
|
||||||
subject=properties.subject,
|
subject=properties.subject,
|
||||||
|
@ -348,7 +348,7 @@ class MUC:
|
||||||
return
|
return
|
||||||
|
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('voice-approval',
|
NetworkEvent('muc-voice-approval',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
jid=jid,
|
jid=jid,
|
||||||
form=properties.voice_request.form))
|
form=properties.voice_request.form))
|
||||||
|
@ -367,7 +367,7 @@ class MUC:
|
||||||
store_bob_data(properties.captcha.bob_data)
|
store_bob_data(properties.captcha.bob_data)
|
||||||
|
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('captcha-challenge',
|
NetworkEvent('muc-captcha-challenge',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
jid=properties.jid,
|
jid=properties.jid,
|
||||||
form=properties.captcha.form))
|
form=properties.captcha.form))
|
||||||
|
@ -380,7 +380,7 @@ class MUC:
|
||||||
log.info('Received config change: %s %s',
|
log.info('Received config change: %s %s',
|
||||||
properties.jid, properties.muc_status_codes)
|
properties.jid, properties.muc_status_codes)
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('gc-config-changed-received',
|
NetworkEvent('muc-config-changed',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
jid=properties.jid,
|
jid=properties.jid,
|
||||||
status_codes=properties.muc_status_codes))
|
status_codes=properties.muc_status_codes))
|
||||||
|
@ -396,7 +396,7 @@ class MUC:
|
||||||
data.from_, data.reason)
|
data.from_, data.reason)
|
||||||
|
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('gc-decline-received',
|
NetworkEvent('muc-decline',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
**data._asdict()))
|
**data._asdict()))
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
@ -414,7 +414,7 @@ class MUC:
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
app.nec.push_incoming_event(
|
app.nec.push_incoming_event(
|
||||||
NetworkEvent('gc-invitation-received',
|
NetworkEvent('muc-invitation',
|
||||||
account=self._account,
|
account=self._account,
|
||||||
**data._asdict()))
|
**data._asdict()))
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
@ -444,7 +444,7 @@ class MUC:
|
||||||
return
|
return
|
||||||
|
|
||||||
app.nec.push_incoming_event(NetworkEvent(
|
app.nec.push_incoming_event(NetworkEvent(
|
||||||
'muc-owner-received',
|
'muc-config',
|
||||||
conn=self._con,
|
conn=self._con,
|
||||||
dataform=result.form,
|
dataform=result.form,
|
||||||
jid=result.jid))
|
jid=result.jid))
|
||||||
|
|
|
@ -321,20 +321,20 @@ class GroupchatControl(ChatControlBase):
|
||||||
('muc-user-affiliation-changed', ged.GUI1, self._on_affiliation_changed),
|
('muc-user-affiliation-changed', ged.GUI1, self._on_affiliation_changed),
|
||||||
('muc-user-status-show-changed', ged.GUI1, self._on_status_show_changed),
|
('muc-user-status-show-changed', ged.GUI1, self._on_status_show_changed),
|
||||||
('muc-user-role-changed', ged.GUI1, self._on_role_changed),
|
('muc-user-role-changed', ged.GUI1, self._on_role_changed),
|
||||||
('muc-destroyed', ged.GUI1, self._on_muc_destroyed),
|
('muc-destroyed', ged.GUI1, self._on_destroyed),
|
||||||
('muc-presence-error', ged.GUI1, self._on_muc_presence_error),
|
('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),
|
('gc-message-received', ged.GUI1, self._nec_gc_message_received),
|
||||||
('mam-decrypted-message-received', ged.GUI1, self._nec_mam_decrypted_message_received),
|
('mam-decrypted-message-received', ged.GUI1, self._nec_mam_decrypted_message_received),
|
||||||
('vcard-published', ged.GUI1, self._nec_vcard_published),
|
('vcard-published', ged.GUI1, self._nec_vcard_published),
|
||||||
('update-gc-avatar', ged.GUI1, self._nec_update_avatar),
|
('update-gc-avatar', ged.GUI1, self._nec_update_avatar),
|
||||||
('update-room-avatar', ged.GUI1, self._nec_update_room_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),
|
('signed-in', ged.GUI1, self._nec_signed_in),
|
||||||
('decrypted-message-received', ged.GUI2, self._nec_decrypted_message_received),
|
('decrypted-message-received', ged.GUI2, self._nec_decrypted_message_received),
|
||||||
('gc-stanza-message-outgoing', ged.OUT_POSTCORE, self._message_sent),
|
('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:
|
for handler in self._event_handlers:
|
||||||
|
@ -1441,7 +1441,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
self.subject = subject
|
self.subject = subject
|
||||||
self.draw_banner_text()
|
self.draw_banner_text()
|
||||||
|
|
||||||
def _nec_gc_subject_received(self, event):
|
def _on_subject(self, event):
|
||||||
if event.account != self.account:
|
if event.account != self.account:
|
||||||
return
|
return
|
||||||
if event.jid != self.room_jid:
|
if event.jid != self.room_jid:
|
||||||
|
@ -1467,7 +1467,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
else:
|
else:
|
||||||
self.subject_button.show()
|
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
|
# http://www.xmpp.org/extensions/xep-0045.html#roomconfig-notify
|
||||||
if event.account != self.account:
|
if event.account != self.account:
|
||||||
return
|
return
|
||||||
|
@ -2060,7 +2060,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
self.print_conversation(_('%s has joined the group chat') % nick,
|
self.print_conversation(_('%s has joined the group chat') % nick,
|
||||||
graphics=False)
|
graphics=False)
|
||||||
|
|
||||||
def _on_muc_presence_error(self, event):
|
def _on_presence_error(self, event):
|
||||||
if event.account != self.account:
|
if event.account != self.account:
|
||||||
return
|
return
|
||||||
if event.room_jid != self.room_jid:
|
if event.room_jid != self.room_jid:
|
||||||
|
@ -2158,7 +2158,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
if self.is_continued:
|
if self.is_continued:
|
||||||
self.draw_banner_text()
|
self.draw_banner_text()
|
||||||
|
|
||||||
def _on_muc_destroyed(self, event):
|
def _on_destroyed(self, event):
|
||||||
if event.account != self.account:
|
if event.account != self.account:
|
||||||
return
|
return
|
||||||
if event.room_jid != self.room_jid:
|
if event.room_jid != self.room_jid:
|
||||||
|
|
|
@ -1392,8 +1392,8 @@ class Interface:
|
||||||
'connection-lost': [self.handle_event_connection_lost],
|
'connection-lost': [self.handle_event_connection_lost],
|
||||||
'file-request-error': [self.handle_event_file_request_error],
|
'file-request-error': [self.handle_event_file_request_error],
|
||||||
'file-request-received': [self.handle_event_file_request],
|
'file-request-received': [self.handle_event_file_request],
|
||||||
'gc-invitation-received': [self.handle_event_gc_invitation],
|
'muc-invitation': [self.handle_event_gc_invitation],
|
||||||
'gc-decline-received': [self.handle_event_gc_decline],
|
'muc-decline': [self.handle_event_gc_decline],
|
||||||
'gpg-password-required': [self.handle_event_gpg_password_required],
|
'gpg-password-required': [self.handle_event_gpg_password_required],
|
||||||
'gpg-trust-key': [self.handle_event_gpg_trust_key],
|
'gpg-trust-key': [self.handle_event_gpg_trust_key],
|
||||||
'http-auth-received': [self.handle_event_http_auth],
|
'http-auth-received': [self.handle_event_http_auth],
|
||||||
|
@ -1411,7 +1411,7 @@ class Interface:
|
||||||
'message-not-sent': [self.handle_event_msgnotsent],
|
'message-not-sent': [self.handle_event_msgnotsent],
|
||||||
'message-sent': [self.handle_event_msgsent],
|
'message-sent': [self.handle_event_msgsent],
|
||||||
'metacontacts-received': [self.handle_event_metacontacts],
|
'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],
|
'our-show': [self.handle_event_status],
|
||||||
'password-required': [self.handle_event_password_required],
|
'password-required': [self.handle_event_password_required],
|
||||||
'plain-connection': [self.handle_event_plain_connection],
|
'plain-connection': [self.handle_event_plain_connection],
|
||||||
|
|
|
@ -2677,7 +2677,7 @@ class RosterWindow:
|
||||||
app.log('avatar').debug('Draw roster avatar: %s', obj.jid)
|
app.log('avatar').debug('Draw roster avatar: %s', obj.jid)
|
||||||
self.draw_avatar(obj.jid, obj.account)
|
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)
|
self.draw_contact(event.jid, event.account)
|
||||||
|
|
||||||
def _nec_metacontacts_received(self, obj):
|
def _nec_metacontacts_received(self, obj):
|
||||||
|
@ -5861,8 +5861,8 @@ class RosterWindow:
|
||||||
self._nec_update_avatar)
|
self._nec_update_avatar)
|
||||||
app.ged.register_event_handler('update-room-avatar', ged.GUI1,
|
app.ged.register_event_handler('update-room-avatar', ged.GUI1,
|
||||||
self._nec_update_avatar)
|
self._nec_update_avatar)
|
||||||
app.ged.register_event_handler('gc-subject-received', ged.GUI1,
|
app.ged.register_event_handler('muc-subject', ged.GUI1,
|
||||||
self._nec_gc_subject_received)
|
self._nec_muc_subject_received)
|
||||||
app.ged.register_event_handler('metacontacts-received', ged.GUI2,
|
app.ged.register_event_handler('metacontacts-received', ged.GUI2,
|
||||||
self._nec_metacontacts_received)
|
self._nec_metacontacts_received)
|
||||||
app.ged.register_event_handler('signed-in', ged.GUI1,
|
app.ged.register_event_handler('signed-in', ged.GUI1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue