new ACE option: send_sha_in_gc_presence that allow to send sha info in groupchat presences
This commit is contained in:
		
							parent
							
								
									7928e82d48
								
							
						
					
					
						commit
						f455e974c1
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -174,6 +174,7 @@ class Config:
 | 
			
		|||
		'roster_window_skip_taskbar': [opt_bool, False],
 | 
			
		||||
		'use_urgency_hint': [opt_bool, True, _('If True and installed GTK+ and PyGTK versions are at least 2.8, make the window flash (the default behaviour in most Window Managers) when holding pending events.')],
 | 
			
		||||
		'notification_timeout': [opt_int, 5],
 | 
			
		||||
		'send_sha_in_gc_presence': [opt_bool, True, _('Jabberd1.4 does not like sha info when one join a password protected room. Turn this option to False to stop sending sha info in groupchat presences')],
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	__options_per_key = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2182,7 +2182,8 @@ class Connection:
 | 
			
		|||
		show = helpers.get_xmpp_show(STATUS_LIST[self.connected])
 | 
			
		||||
		p = common.xmpp.Presence(to = '%s@%s/%s' % (room, server, nick),
 | 
			
		||||
			show = show, status = self.status)
 | 
			
		||||
		p = self.add_sha(p)
 | 
			
		||||
		if gajim.config.get('send_sha_in_gc_presence'):
 | 
			
		||||
			p = self.add_sha(p)
 | 
			
		||||
		t = p.setTag(common.xmpp.NS_MUC + ' x')
 | 
			
		||||
		if password:
 | 
			
		||||
			t.setTagData('password', password)
 | 
			
		||||
| 
						 | 
				
			
			@ -2228,7 +2229,8 @@ class Connection:
 | 
			
		|||
		show = helpers.get_xmpp_show(show)
 | 
			
		||||
		p = common.xmpp.Presence(to = '%s/%s' % (jid, nick), typ = ptype,
 | 
			
		||||
			show = show, status = status)
 | 
			
		||||
		p = self.add_sha(p)
 | 
			
		||||
		if gajim.config.get('send_sha_in_gc_presence'):
 | 
			
		||||
			p = self.add_sha(p)
 | 
			
		||||
		# send instantly so when we go offline, status is sent to gc before we
 | 
			
		||||
		# disconnect from jabber server
 | 
			
		||||
		self.connection.send(p)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue