allow participants to invite contacts in continued groupchats. see #2095

This commit is contained in:
Yann Leboulanger 2007-08-22 11:46:35 +00:00
parent a08deb0bec
commit e982404d58
1 changed files with 11 additions and 2 deletions

View File

@ -208,6 +208,7 @@ from common import socks5
from common import gajim from common import gajim
from common import helpers from common import helpers
from common import optparser from common import optparser
from common import dataforms
if verbose: gajim.verbose = True if verbose: gajim.verbose = True
del verbose del verbose
@ -1207,8 +1208,16 @@ class Interface:
#('GC_CONFIG', account, (jid, form)) config is a dict #('GC_CONFIG', account, (jid, form)) config is a dict
room_jid = array[0].split('/')[0] room_jid = array[0].split('/')[0]
if room_jid in gajim.automatic_rooms[account]: if room_jid in gajim.automatic_rooms[account]:
# use default configuration if gajim.automatic_rooms[account][room_jid].has_key('continue_tag'):
gajim.connections[account].send_gc_config(room_jid, array[1]) # We're converting chat to muc. allow participants to invite
form = dataforms.ExtendForm(node = array[1])
for f in form.iter_fields():
if f.var == 'muc#roomconfig_allowinvites':
f.value = True
gajim.connections[account].send_gc_config(room_jid, form)
else:
# use default configuration
gajim.connections[account].send_gc_config(room_jid, array[1])
# invite contacts # invite contacts
# check if it is necessary to add <continue /> # check if it is necessary to add <continue />
continue_tag = False continue_tag = False