Commit 2b166066 authored by Philipp Hörist's avatar Philipp Hörist

GroupChatControl: Use helper for popup logic

parent a72de039
Pipeline #6362 passed with stages
in 4 minutes and 6 seconds
......@@ -51,6 +51,7 @@
from gajim.common import helpers
from gajim.common.helpers import event_filter
from gajim.common.helpers import to_user_string
from gajim.common.helpers import allow_popup_window
from gajim.common.const import AvatarSize
from gajim.common.i18n import _
......@@ -916,16 +917,13 @@ def on_private_message(self, nick, sent, msg, tim, session, additional_data,
additional_data=additional_data)
app.events.add_event(self.account, fjid, event)
autopopup = app.settings.get('autopopup')
autopopupaway = app.settings.get('autopopupaway')
if not autopopup or (not autopopupaway and \
app.account_is_available(self.account)):
if allow_popup_window(self.account):
self._start_private_message(nick)
else:
self.roster.draw_contact(nick)
if self.parent_win:
self.parent_win.show_title()
self.parent_win.redraw_tab(self)
else:
self._start_private_message(nick)
contact = app.contacts.get_contact_with_highest_priority(
self.account, self.room_jid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment