xmpp code in connection.py instead of gajim.py
This commit is contained in:
parent
c4e9be83cd
commit
59b2bf1d31
|
@ -311,7 +311,12 @@ class Connection:
|
||||||
log_msgtxt = _('Subject: %s\n%s') % (subject, msgtxt)
|
log_msgtxt = _('Subject: %s\n%s') % (subject, msgtxt)
|
||||||
gajim.logger.write('incoming', log_msgtxt, frm, tim = tim)
|
gajim.logger.write('incoming', log_msgtxt, frm, tim = tim)
|
||||||
if invite is not None:
|
if invite is not None:
|
||||||
self.dispatch('GC_INVITATION',(frm, invite))
|
item = invite.getTag('invite')
|
||||||
|
jid_from = item.getAttr('from')
|
||||||
|
reason = item.getTagData('reason')
|
||||||
|
item = invite.getTag('password')
|
||||||
|
password = invite.getTagData('password')
|
||||||
|
self.dispatch('GC_INVITATION',(frm, jid_from, reason, password))
|
||||||
else:
|
else:
|
||||||
self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject,
|
self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject,
|
||||||
None))
|
None))
|
||||||
|
|
16
src/gajim.py
16
src/gajim.py
|
@ -713,19 +713,9 @@ class Interface:
|
||||||
config.GroupchatConfigWindow(self, account, jid, array[1])
|
config.GroupchatConfigWindow(self, account, jid, array[1])
|
||||||
|
|
||||||
def handle_event_gc_invitation(self, account, array):
|
def handle_event_gc_invitation(self, account, array):
|
||||||
#('GC_INVITATION', (unicode(msg.getFrom()), invite))
|
#('GC_INVITATION', (room_jid, jid_from, reason, password))
|
||||||
items = array[1].getChildren()
|
dialogs.InvitationReceivedDialog(self, account, array[0], array[1],
|
||||||
password = None
|
array[3], array[2])
|
||||||
reason = None
|
|
||||||
for item in items:
|
|
||||||
if item.getName() == 'invite':
|
|
||||||
contact_jid = item.getAttr('from')
|
|
||||||
reason = item.getTagData('reason')
|
|
||||||
if item.getName() == 'password':
|
|
||||||
password = item.getData()
|
|
||||||
|
|
||||||
dialogs.InvitationReceivedDialog(self, account, array[0], contact_jid,
|
|
||||||
password, reason)
|
|
||||||
|
|
||||||
def handle_event_bad_passphrase(self, account, array):
|
def handle_event_bad_passphrase(self, account, array):
|
||||||
use_gpg_agent = gajim.config.get('use_gpg_agent')
|
use_gpg_agent = gajim.config.get('use_gpg_agent')
|
||||||
|
|
Loading…
Reference in New Issue