Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
4ecfd7c0
by lovetox at 2020-04-10T22:33:33+02:00
-
083d8520
by lovetox at 2020-04-10T23:19:53+02:00
-
82a18e6f
by lovetox at 2020-04-10T23:20:44+02:00
3 changed files:
Changes:
| ... | ... | @@ -56,7 +56,7 @@ class Client(ConnectionHandlers): |
| 56 | 56 |
self._user = app.config.get_per('accounts', self._account, 'name')
|
| 57 | 57 |
self.password = None
|
| 58 | 58 |
|
| 59 |
- self.priority = 0
|
|
| 59 |
+ self._priority = 0
|
|
| 60 | 60 |
self.handlers_registered = False
|
| 61 | 61 |
self._connect_machine_calls = 0
|
| 62 | 62 |
self.avatar_conversion = False
|
| ... | ... | @@ -102,6 +102,10 @@ class Client(ConnectionHandlers): |
| 102 | 102 |
def status_message(self):
|
| 103 | 103 |
return self._status_message
|
| 104 | 104 |
|
| 105 |
+ @property
|
|
| 106 |
+ def priority(self):
|
|
| 107 |
+ return self._priority
|
|
| 108 |
+ |
|
| 105 | 109 |
@property
|
| 106 | 110 |
def certificate(self):
|
| 107 | 111 |
return self._client.peer_certificate[0]
|
| ... | ... | @@ -356,16 +360,14 @@ class Client(ConnectionHandlers): |
| 356 | 360 |
destroy_client=True)
|
| 357 | 361 |
return
|
| 358 | 362 |
|
| 359 |
- priority = app.get_priority(self._account, show)
|
|
| 363 |
+ self._priority = app.get_priority(self._account, show)
|
|
| 360 | 364 |
|
| 361 | 365 |
self.get_module('Presence').send_presence(
|
| 362 |
- priority=priority,
|
|
| 366 |
+ priority=self._priority,
|
|
| 363 | 367 |
show=show,
|
| 364 | 368 |
status=msg,
|
| 365 | 369 |
idle_time=auto)
|
| 366 | 370 |
|
| 367 |
- self.priority = priority
|
|
| 368 |
- |
|
| 369 | 371 |
self.get_module('MUC').update_presence(auto=auto)
|
| 370 | 372 |
|
| 371 | 373 |
app.nec.push_incoming_event(
|
| ... | ... | @@ -397,15 +399,13 @@ class Client(ConnectionHandlers): |
| 397 | 399 |
self._send_first_presence()
|
| 398 | 400 |
|
| 399 | 401 |
def _send_first_presence(self):
|
| 400 |
- priority = app.get_priority(self._account, self._status)
|
|
| 402 |
+ self._priority = app.get_priority(self._account, self._status)
|
|
| 401 | 403 |
|
| 402 | 404 |
self.get_module('Presence').send_presence(
|
| 403 |
- priority=priority,
|
|
| 405 |
+ priority=self._priority,
|
|
| 404 | 406 |
show=self._status,
|
| 405 | 407 |
status=self._status_message)
|
| 406 | 408 |
|
| 407 |
- self.priority = priority
|
|
| 408 |
- |
|
| 409 | 409 |
self._set_client_available()
|
| 410 | 410 |
|
| 411 | 411 |
if not self.avatar_conversion:
|
| ... | ... | @@ -287,8 +287,8 @@ class Config: |
| 287 | 287 |
'savepass': [opt_bool, False],
|
| 288 | 288 |
'password': [opt_str, ''],
|
| 289 | 289 |
'resource': [opt_str, 'gajim.$rand', '', True],
|
| 290 |
- 'priority': [opt_int, 5, '', True],
|
|
| 291 |
- 'adjust_priority_with_status': [opt_bool, True, _('Priority will change automatically according to your status. Priorities are defined in \'autopriority_*\' options.')],
|
|
| 290 |
+ 'priority': [opt_int, 0, '', True],
|
|
| 291 |
+ 'adjust_priority_with_status': [opt_bool, False, _('Priority will change automatically according to your status. Priorities are defined in \'autopriority_*\' options.')],
|
|
| 292 | 292 |
'autopriority_online': [opt_int, 50],
|
| 293 | 293 |
'autopriority_chat': [opt_int, 50],
|
| 294 | 294 |
'autopriority_away': [opt_int, 40],
|
| ... | ... | @@ -215,7 +215,8 @@ class MUC(BaseModule): |
| 215 | 215 |
self._con.get_module('Presence').send_presence(
|
| 216 | 216 |
muc_data.occupant_jid,
|
| 217 | 217 |
typ='unavailable',
|
| 218 |
- status=reason)
|
|
| 218 |
+ status=reason,
|
|
| 219 |
+ caps=False)
|
|
| 219 | 220 |
# We leave a group chat, disable bookmark autojoin
|
| 220 | 221 |
self._con.get_module('Bookmarks').modify(room_jid, autojoin=False)
|
| 221 | 222 |
|
| ... | ... | @@ -303,7 +304,6 @@ class MUC(BaseModule): |
| 303 | 304 |
muc_data.occupant_jid,
|
| 304 | 305 |
show=self._con.status,
|
| 305 | 306 |
status=self._con.status_message,
|
| 306 |
- caps=True,
|
|
| 307 | 307 |
idle_time=auto)
|
| 308 | 308 |
|
| 309 | 309 |
def change_nick(self, room_jid, new_nick):
|