Commit graph libervia-backend/src/plugins/plugin_xep_0045.py
Author SHA1 Message Date
souliane
41b549f7ae core, plugin XEP-0045, frontends: change frontend method "setStatusOnline" for "setPresenceStatus":
- remove parameter "online" (can be guess from "presence" value)
    - process "statuses" dict in quick_frontend, so this method can get a simple unicode "status"
    - add C.PRESENCE_STATUSES_DEFAULT to define the key to use for fallback status
2015-04-20 16:39:38 +02:00
souliane
67ff77e5de massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions 2015-04-16 14:57:57 +02:00
souliane
bf04fcf780 plugin XEP-0045, quick_frontend, primitivus: replace C.DEFAULT_MUC by bridge method getDefaultMUC (value is defined in plugin XEP-0045 and can be overriden with the config file) 2015-04-09 11:27:13 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
souliane
3bff0d0237 memory, plugin XEP-0045: getMainResource returns None when asking a MUC entity + fixes /whois on a MUC (bare) entity 2015-03-25 15:28:02 +01:00
souliane
d4c627d71f plugins XEP-0045, XEP-0249: allow to join / invite without specifying the JID's host part (use client's values) 2015-03-24 07:34:32 +01:00
Goffi
6875e4f906 plugin XEP-0045: /join text command can be used in all contexts, not only group 2015-03-20 20:49:58 +01:00
Goffi
9443b14c59 plugin text command, XEP-0045, XEP-0048, XEP-0249: removed feedBackWrongContext which is no more usefull with new _contextValid method 2015-03-19 14:30:08 +01:00
souliane
d9cc2f181e plugins XEP-0045, XEP-0249, parrot: use JID instead of unicode in many methods + class attributes 2015-03-11 12:35:21 +01:00
souliane
204f024e0c plugin XEP-0045: make joinMUC asynchronous and fixes its handler 2015-03-07 16:28:12 +01:00
Goffi
cdfb2c4dc6 core (memory): updateEntityData now accept a "silent" argument to avoid sending signal to frontends when updating an attribute with "signalOnUpdate" flag. 2015-02-09 21:39:51 +01:00
souliane
a43608b966 plugin XEP-0045: use HISTORY_LIMIT param to retrieve the MUC history 2014-10-22 14:16:01 +02:00
souliane
af7277d4f4 plugin XEP-0045: set the entity data "type" asap (userJoinedRoom is triggered before the join callback) 2014-10-20 15:09:37 +02:00
souliane
100ba3969e plugin XEP-0045: handle MUC presence 2014-10-17 15:49:46 +02:00
Matteo Cypriani
71e29f5c44 misc: fixed some typos 2014-09-15 14:18:25 +02:00
Goffi
ed3313c169 plugin OTR: a warning is logged when Account is instancied with a bare jid. 2014-08-25 21:32:23 +02:00
souliane
af2a634764 plugin XEP-0045: change security limit of "config room" menu to 4 2014-07-15 18:26:36 +02:00
Goffi
f5d2a31520 pluging XEP-0045: configure room dynamic menu 2014-06-26 00:05:25 +02:00
souliane
7d849b11ca plugin XEP-0045: small refactorization + clean on profile's disconnection 2014-06-23 16:07:13 +02:00
souliane
56ec86b8e5 plugin XEP-0045, text_commands: add some commands:
- handle generic failure in text_commands
    - fix command /leave and a logging message
    - add commands /kick /ban /affiliate
2014-06-23 15:42:56 +02:00
souliane
e18adb373d plugin XEP-0045: room configuration returns a success or failure message 2014-06-12 18:56:08 +02:00
Goffi
ba103161d5 core (log): refactoring + twisted backend:
- configuration is now done with classes, so inheritance is possible
    - twisted backend now use twisted log methods
    - log not produced by SàT directly in twisted backend are captured by an observer (twistedObserver) and sent back to SàT logging chain, with the "twisted" logger.
    - \\default output use normal twistd output, except in debug mode where it add an stdout output in addition to the log file.
    - when log_colors = True, colors are enabled only where it's possible (tty out), when log_colors=force colors are always enabled.
    - fixed some bad log.xxx calls
2014-05-05 18:58:34 +02:00
souliane
42b1b6c4ed plugins TEXT-COMMANDS, XEP-0045, XEP-0048, XEP-0249:
- give a feedback instead of sending the message when the command is invalid or used in a wrong context
    - add command /join for XEP-0249
2014-04-30 16:34:09 +02:00
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
Goffi
d454d9a66e plugin XEP-0045: profileConnected return the deferred, so muc service presence is checked before the end of initialisation 2014-03-31 12:23:13 +02:00
Goffi
95678d7967 core, plugin XEP-0115: discovery refactoring:
- hashing algorithm of XEP-0115 has been including in core
    - our own hash is still calculated by XEP-0115 and can be regenerated with XEP_0115.recalculateHash
    - old discovery methods have been removed. Now the following methods are used:
        - hasFeature: tell if a feature is available for an entity
        - getDiscoInfos: self explaining
        - getDiscoItems: self explaining
        - findServiceEntities: return all available items of an entity which given (category, type)
        - findFeaturesSet: search for a set of features in entity + entity's items
      all these methods are asynchronous, and manage cache automatically
    - XEP-0115 manage in a better way hashes, and now use a trigger for presence instead of monkey patch
    - new FeatureNotFound exception, when we want to do something which is not available
    - refactored client initialisation sequence, removed client.initialized Deferred
    - added constant APP_URL
    - test_plugin_xep_0033.py has been temporarly deactivated, the time to adapt it
    - lot of cleaning
2014-03-28 18:07:22 +01:00
Goffi
b826dd7c10 plugin XEP-0045: added user information to /whois text command 2014-03-24 14:46:18 +01:00
Goffi
8a52f6defa plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
- registerTextCommands can be called by a plugin in its __init__ method, it looks for methods starting with "cmd_" and register them as new commands
    - addWhoIsCb: add a callback to /whois command, the callback can complete whois informations
    - plugins parrot, XEP-0045 and XEP-0092 now manage their own commands
2014-03-24 10:57:15 +01:00
Goffi
005ec59a8a core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@' 2014-03-21 16:27:09 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
72fd99f679 plugin XEP-0045, primitivus: added MUC configuration 2014-02-04 18:06:12 +01:00
souliane
f2503f89ae plugins room games, XEP-0045: small fixes, improved docstrings 2014-01-10 18:07:36 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
souliane
89c2519ae7 plugin XEP-0045: remove redondant errback from _join 2013-11-28 21:27:18 +01:00
souliane
718bb98300 plugin XEP-0033: implementation of the addressing feature:
- frontends pass the recipients in the extra parameter of sendMessage
    - backend checks if the target server supports the feature (this is not done yet by prosody plugin)
    - features and identities are cached per profile and server
    - messages are duplicated in history for now (TODO: redesign the database)
    - echos signals are also duplicated to the sender (FIXME)
2013-12-11 17:16:53 +01:00
souliane
b037678f13 plugins XEP-0045: added methods to get room nicks and "MUC user left" trigger 2013-11-19 19:31:59 +01:00
souliane
4ef842a213 plugin XEP-0045: fixed incorrect exceptions name 2013-11-17 17:02:22 +01:00
souliane
8190f82caf plugins (MUC, tools, games): generalize the generation of a unique room name when joining a MUC and no room is specified:
- method to get the MUC service moved to plugin_xep_0045
- joinMUC returns the muc name (given by user or generated)
- getUniqueName can receive a specified service in argument
2013-11-17 16:59:12 +01:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Goffi
b9cd83ac51 plugin XEP-0045: fixed isNickInRoom 2013-02-20 20:36:09 +01:00
Goffi
f2de1c7c85 plugin XEP-0045: fixed mucLeave bridge method 2013-01-26 00:30:00 +01:00
Emmanuel Gil Peyrot
0dca274360 Fix pep8 support in src/plugins. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
ef6dbda917 plugin XEP-0045: in case of nickname conflict when entering a room, a new one is automaticaly assigned 2012-10-21 22:31:57 +02:00
Goffi
53aefedcfa plugin XEP-0045: added isNickInRoom method 2012-10-21 13:36:28 +02:00
Goffi
72da42f762 reverted bad commit 2012-10-21 12:55:27 +02:00
Goffi
031bd3134f primitivus: fixed messages order in chat window 2012-10-21 12:03:29 +02:00
Goffi
902045e174 plugin XEP-0045, plugin text commands: added '/title' command 2012-10-20 18:02:14 +02:00