Beispiel #1
0
 def init(self):
     self.events_handlers = {
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_msgs),
     }
     self.config_dialog = None
     self.gui_extension_points = {'chat_control_base':
                                  (self.connect_ui, None)}
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
Beispiel #2
0
    def init(self):
        """ Init """
        if ERROR_MSG:
            self.activatable = False
            self.available_text = ERROR_MSG
            self.config_dialog = None
            return
        self.events_handlers = {
            'mam-message-received': (ged.PRECORE, self.mam_message_received),
            'message-received': (ged.PRECORE, self.message_received),
            'pep-received': (ged.PRECORE, self.handle_device_list_update),
            'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
            'signed-in': (ged.PRECORE, self.signed_in),
            'stanza-message-outgoing':
            (ged.PRECORE, self.handle_outgoing_stanza),
            'message-outgoing': (ged.PRECORE, self.handle_outgoing_event)
        }

        self.events_handlers['gc-stanza-message-outgoing'] =\
            (ged.PRECORE, self.handle_outgoing_gc_stanza)
        self.events_handlers['gc-presence-received'] =\
            (ged.PRECORE, self.gc_presence_received)
        self.events_handlers['gc-config-changed-received'] =\
            (ged.PRECORE, self.gc_config_changed_received)
        self.events_handlers['muc-admin-received'] =\
            (ged.PRECORE, self.room_memberlist_received)

        self.config_dialog = OMEMOConfigDialog(self)
        self.gui_extension_points = {
            'chat_control': (self.connect_ui, self.disconnect_ui),
            'groupchat_control': (self.connect_ui, self.disconnect_ui)
        }
        SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
        self.plugin = self
        self.announced = []
        self.query_for_bundles = []
        self.disabled_accounts = []
        self.gc_message = {}

        self.config_default_values = {
            'DISABLED_ACCOUNTS': ([], ''),
        }

        for account in self.plugin.config['DISABLED_ACCOUNTS']:
            self.disabled_accounts.append(account)

        # add aesgcm:// uri scheme to config
        schemes = gajim.config.get('uri_schemes')
        if 'aesgcm://' not in schemes.split():
            schemes += ' aesgcm://'
            gajim.config.set('uri_schemes', schemes)
Beispiel #3
0
 def init(self):
     self.events_handlers = {
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_msgs),
     }
     self.config_dialog = None
     self.gui_extension_points = {
         'chat_control_base': (self.connect_ui, None)
     }
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
Beispiel #4
0
 def init(self):
     if not HAS_AXOLOTL:
         self.activatable = False
         self.available_text = _(AXOLOTL_MISSING)
         return
     self.events_handlers = {
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_msgs),
     }
     self.config_dialog = None
     self.gui_extension_points = {'chat_control':
                                  (self.connect_ui, None)}
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
Beispiel #5
0
    def init(self):
        """ Init """
        if ERROR_MSG:
            self.activatable = False
            self.available_text = ERROR_MSG
            self.config_dialog = None
            return
        self.events_handlers = {
            'mam-message-received': (ged.PRECORE, self.mam_message_received),
            'message-received': (ged.PRECORE, self.message_received),
            'pep-received': (ged.PRECORE, self.handle_device_list_update),
            'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
            'signed-in': (ged.PRECORE, self.signed_in),
            'stanza-message-outgoing':
            (ged.PRECORE, self.handle_outgoing_stanza),
            'message-outgoing':
            (ged.PRECORE, self.handle_outgoing_event)}
        if GROUPCHAT:
            self.events_handlers['gc-stanza-message-outgoing'] =\
                (ged.PRECORE, self.handle_outgoing_gc_stanza)
            self.events_handlers['gc-presence-received'] =\
                (ged.PRECORE, self.gc_presence_received)
            self.events_handlers['gc-config-changed-received'] =\
                (ged.PRECORE, self.gc_config_changed_received)
            self.events_handlers['muc-admin-received'] =\
                (ged.PRECORE, self.room_memberlist_received)

        self.config_dialog = OMEMOConfigDialog(self)
        self.gui_extension_points = {'chat_control': (self.connect_ui,
                                                      self.disconnect_ui),
                                     'groupchat_control': (self.connect_ui,
                                                           self.disconnect_ui)}
        SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
        self.plugin = self
        self.announced = []
        self.query_for_bundles = []
        self.disabled_accounts = []
        self.gc_message = {}

        self.config_default_values = {'DISABLED_ACCOUNTS': ([], ''), }

        for account in self.plugin.config['DISABLED_ACCOUNTS']:
            self.disabled_accounts.append(account)
Beispiel #6
0
 def init(self):
     # pylint: disable=attribute-defined-outside-init
     if not HAS_AXOLOTL:
         self.activatable = False
         self.available_text = _(AXOLOTL_MISSING)
         return
     self.events_handlers = {
         'mam-message-received': (ged.PRECORE, self.mam_message_received),
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_stanza),
         'message-outgoing':
         (ged.PRECORE, self.handle_outgoing_event),
     }
     self.config_dialog = ui.OMEMOConfigDialog(self)
     self.gui_extension_points = {'chat_control': (self.connect_ui,
                                                   self.disconnect_ui)}
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
     self.plugin = self
     self.announced = []
Beispiel #7
0
 def init(self):
     # pylint: disable=attribute-defined-outside-init
     if not HAS_AXOLOTL:
         self.activatable = False
         self.available_text = _(AXOLOTL_MISSING)
         return
     self.events_handlers = {
         'mam-message-received': (ged.PRECORE, self.mam_message_received),
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_stanza),
         'message-outgoing': (ged.PRECORE, self.handle_outgoing_event),
     }
     self.config_dialog = ui.OMEMOConfigDialog(self)
     self.gui_extension_points = {
         'chat_control': (self.connect_ui, self.disconnect_ui)
     }
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
     self.plugin = self
     self.announced = []
     self.query_for_bundles = []
Beispiel #8
0
 def init(self):
     """ Init """
     if ERROR_MSG:
         self.activatable = False
         self.available_text = ERROR_MSG
         return
     self.events_handlers = {
         'mam-message-received': (ged.PRECORE, self.mam_message_received),
         'message-received': (ged.PRECORE, self.message_received),
         'pep-received': (ged.PRECORE, self.handle_device_list_update),
         'raw-iq-received': (ged.PRECORE, self.handle_iq_received),
         'signed-in': (ged.PRECORE, self.signed_in),
         'stanza-message-outgoing':
         (ged.PRECORE, self.handle_outgoing_stanza),
         'message-outgoing':
         (ged.PRECORE, self.handle_outgoing_event),
     }
     self.config_dialog = ui.OMEMOConfigDialog(self)
     self.gui_extension_points = {'chat_control': (self.connect_ui,
                                                   self.disconnect_ui)}
     SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
     self.plugin = self
     self.announced = []
     self.query_for_bundles = []