Commit graph libervia-backend/src/plugins
Author SHA1 Message Date
Goffi
749bd76f62 plugin XEP-0045: fix after client refactoring 2017-02-12 21:17:56 +01:00
Goffi
3bc851abf2 core (memory/disco): getInfos now handle node + use client instead of profile in many methods 2017-02-12 20:43:20 +01:00
Goffi
ac7d587c49 core (plugins): added missing contants + use of new constants in PLUGIN_INFO 2017-02-12 18:59:10 +01:00
Goffi
97337202cb core, jp: component handling + client handling refactoring:
- SàT can now handle components
    - plugin have now a "modes" key in PLUGIN_INFO where they declare if they can be used with clients and or components. They default to be client only.
    - components are really similar to clients, but with some changes in behaviour:
        * component has "entry point", which is a special plugin with a componentStart method, which is called just after component is connected
        * trigger end with a different suffixes (e.g. profileConnected vs profileConnectedComponent), so a plugin which manage both clients and components can have different workflow
        * for clients, only triggers of plugins handling client mode are launched
        * for components, only triggers of plugins needed in dependencies are launched. They all must handle component mode.
        * component have a sendHistory attribute (False by default) which can be set to True to allow saving sent messages into history
        * for convenience, "client" is still used in method even if it can now be a component
        * a new "component" boolean attribute tells if we have a component or a client
        * components have to add themselve Message protocol
        * roster and presence protocols are not added for components
        * component default port is 5347 (which is Prosody's default port)
    - asyncCreateProfile has been renamed for profileCreate, both to follow new naming convention and to prepare the transition to fully asynchronous bridge
    - createProfile has a new "component" attribute. When used to create a component, it must be set to a component entry point
    - jp: added --component argument to profile/create
    - disconnect bridge method is now asynchronous, this way frontends can know when disconnection is finished
    - new PI_* constants for PLUGIN_INFO values (not used everywhere yet)
    - client/component connection workflow has been moved to their classes instead of being a host methods
    - host.messageSend is now client.sendMessage, and former client.sendMessage is now client.sendMessageData.
    - identities are now handled in client.identities list, so it can be updated dynamically by plugins (in the future, frontends should be able to update them too through bridge)
    - profileConnecting* profileConnected* profileDisconnected* and getHandler now all use client instead of profile
2017-02-12 17:55:43 +01:00
Goffi
b5f1e45d4e core, bridge, frontends: renamed asyncConnect to connect, and added options parameters (not used yet) 2017-02-06 22:54:43 +01:00
Goffi
4ed0785563 plugin XEP-0184: check if entity is allowed to see our presence before returning receipt 2017-02-06 20:47:36 +01:00
Goffi
aeeb0c5635 plugin OTR, core; use of new sendMessage + OTR mini refactoring:
- new client.sendMessage method is used instead of sendMessageToStream
    - client.feedback is used in OTR
    - OTR now add message processing hints and carbon private element as recommanded by XEP-0364. Explicit Message Encryption is still TODO
    - OTR use the new sendMessageFinish trigger, this has a number of advantages:
        * there is little risk that OTR is skipped by other plugins (they have to use client.sendMessage as recommanded)
        * being at the end of the chain, OTR can check and remove any HTML or other leaking elements
        * OTR doesn't have to skip other plugins anymore, this means that things like delivery receipts are now working with OTR
          (but because there is not full stanza encryption, they can leak metadata)
        * OTR can decide to follow storage hint by letting or deleting "history" key
2017-02-05 15:00:01 +01:00
Goffi
4e13215a94 plugin XEP-0297: used sendMessage in forward, and added comment/warning:
this method need to be checked as it is not used currently, and it may need better integration in the current message sending workflow
2017-02-05 14:55:56 +01:00
Goffi
89b8cb3341 plugin XEP-0280: new setPrivate method to tell server not to carbon copy it. 2017-02-05 14:55:21 +01:00
Goffi
503f8644ba core: replaced SkipHistory exception by a key in mess_data:
SkipHistory was skipping all remaining triggers just to skip history, which is not the intented behaviour.
    Now history can be skipped by setting mess_data[u'history'] = C.HISTORY_SKIP, this way we won't skip importants triggers.
    When history is skipped, mess_data[u'extra'][u'history'] will be set to C.HISTORY_SKIP for frontends, so they can inform user that the message is not stored locally.
2017-02-05 14:55:21 +01:00
Goffi
a2c151f9c6 plugin XEP-0334: fixed and improved message processing hints:
- wrong elements were used in this plugging, it could not work properly
    - use constants for hints
    - add addHint method so other plugins can add a hint easily
    - hints can be added by frontends in mess_data['extra']['hints'] (serialized dict) or by other plugins using addHint
    - if history is skipped on message reception, mess_data['extra']['history']['skipped'] is set
    - introduced PLUGIN_INFO['usage'] for usage information for developers
2017-02-05 14:55:19 +01:00
Goffi
6467bdb3c3 core: replaced calls to client.xmlstream.send by client.send which is the right method to use. client.xmlstream should not be used directly 2017-02-04 17:59:13 +01:00
Goffi
115f5ae0e1 plugin otr: various improvments:
- messageSend trigger now use pre_xml_treatments so it doesn't block other triggers of higher priority
    - text commands now use a very high priority, as it is local command and should not be blocked in most of cases
    - new otrState signal, to send state change to frontends
    - history is not skipped anymore, a future option may change this behaviour
    - OTR trigger are skipped on groupchat messages
    - context_manager is now in client instead of being global to plugin
    - removed fixPotr as it is fixed upstream

note triggers should be improved for encryption methods, as skipping an encrypter may break security, but putting it in top priority may break nice features.

fix bug 170
2017-02-01 21:44:24 +01:00
Goffi
d5fbafd979 plugin sec OTR: fixed OTR:
- fixed bridge calls
    - use deferred translation
    - unicode string fixes
    - various other improvments
2017-01-26 20:24:58 +01:00
Goffi
4eaf5d626f plugin XEP-0054, quick frontend(app): various improvments:
- memory.cache is now used
    - getAvatar and setAvatar has been renamed to avatarGet and avatarSet to follow new convention
    - getAvatar now return (optionally) full path, and may request vCard or only return avatar in cache
    - getAvatarFile has been removed as it is not needed anymore (avatarGet can return full path)
    - getCard has been removed from bridge as it was only used to request avatar
    - new internal method getBareOfFull return jid to use depending of the jid being part of a MUC or not
    - cache is now set per profile in client, instead of a general one for all profiles
    - thanks to the use of memory.cache, correct extension is now used in saved file, according to MIME type
    - fixed and better cache handling
    - a warning message is shown if given avatar hash differs from computed one
    - empty hash value is now in a constant, and ignored if received
    - QuickApp has been updated to follow new behaviour
    - Primitivus has been fixed (it was not declaring not using avatars correclty)
    - jp has been updated to follow new methods name
2017-01-15 17:51:37 +01:00
Goffi
1db9ff572e plugin XEP-0277: fixed mbSetAccess double registration 2017-01-15 16:00:40 +01:00
Goffi
e744c29963 plugin text commands: added /whoami command which return current full jid 2017-01-05 20:29:19 +01:00
Goffi
d0c56aaadb plugin XEP-0231: Bits of Binary first draft:
The current implementation only retrieve data from Bits of Binary, it's not used yet for sending.
When an XHTML-IM message is received (XEP-0071), all <img> are checked and if a cid scheme is found in src attribute the file is retrieved and the src is changed with cached file.
2017-01-05 20:29:05 +01:00
Goffi
791be3a4ad core (xml_tools): fixed findAll
- names and namespases arguments haven been inverted to be in the same order as for domish.Element.elements
    - fixed bad copy of elements in recursions
    - check if childrens are IElements
    - namespaces and names can now be basestrings instead of iterables
2017-01-03 18:51:50 +01:00
Goffi
46ced6d74e plugin text syntaxes: log error on cleanXHTML failure 2017-01-01 16:38:32 +01:00
Goffi
6782bb9a3b plugin android: first draft:
- the plugin cancel its own import if it's not launched on Android platform
    - this plugin show a notification when a non MUC message is received when Cagou is not active
    - the device also optionally vibrate on notification
2016-12-19 23:49:37 +01:00
Goffi
32036a4044 plugin XEP-0280: Message Carbons first draft 2016-12-18 20:21:31 +01:00
Goffi
ced2c16721 xep-0184: delivery receipts are now activated by default 2016-12-18 10:17:32 +01:00
Goffi
9a9ac75b20 xep-0070: fixed use of byte string instead of unicode 2016-12-18 10:16:47 +01:00
Goffi
9bb6c74771 plugin XEP-0071: fixed rich and xhtml sending + add simple text body if not present 2016-09-25 19:17:38 +02:00
Goffi
6395a46e87 plugin XEP-0054(XEP-0153): added a getAvatar:
getAvatar can be used to do the whole process to get avatar file (or empty string if not avatar is found) : it first look in cache and request vCard if nothing is found.
2016-09-13 22:02:52 +02:00
Goffi
d4d4f6534b plugin XEP-0054(XEP-0153): ignore image formats other than gif, jpeg and png, and empty BINVAL 2016-09-10 18:03:24 +02:00
Goffi
42167b6ae9 plugin XEP-0045, quick frontend (app,chat): various chat improvments:
- (XEP-0045): join defered is now fired when room is full joined and history is available
    - (XEP-0045): mucJOIN signature has changed, it now returns the same arguments as mucRoomJoined and a boolean which is True if the room was alread joined
    - quick frontend (app, chat): adapted code to new changes
2016-09-09 23:54:33 +02:00
Goffi
4f26367e7a plugin XEP-0054: fix use of full jid for room occupants 2016-09-09 23:54:33 +02:00
Goffi
b97038f281 plugin XEP-0054: renamed isInRoom to isRoom as the method only tell if the entity belong to a MUC 2016-09-09 23:54:33 +02:00
Goffi
d80d9ae0d4 plugin XEP-0045: minor docstring fix 2016-09-09 23:54:32 +02:00
Goffi
eb1dd1d177 plugin XEP-0245: removed plugin XEP-0245:
at the end it adds complications to handle XEP-0245 in backend (because edge cases must be handled: info type with group chat, history when message is info but for a group chat, etc) while it's trivial to handle it in frontend.
    So /me detection is handled in QuickFrontend and cmd_me is back into plugin_misc_text_commands, it is the choice of the frontend to display or not the "/me" (for frontends based on QuickFrontend it remains automatic).
2016-08-28 21:00:53 +02:00
Goffi
0de4df1051 plugin XEP-0045, XEP-0054, XEP-0096: deprecated bridge method are not used anymore 2016-08-28 18:20:55 +02:00
Goffi
faf645d589 plugin XEP-0249: some modernisation, don't use anymore deprecated methods, invite bridge method use a single param for room jid 2016-08-28 18:18:10 +02:00
Goffi
3142e4fee6 plugin debug: first draft:
this plugin implement some helper tools/bridge method to make development and debugging easier.
The first implemented bridge method, debugFakeSignal, allow to send a signal from the backend, simulating some events in the frontends.
2016-08-21 12:23:09 +02:00
Goffi
ae50946479 plugin XEP-0045: fixed options parameter handling in bridge callback 2016-08-08 00:50:01 +02:00
Geoffrey POUZET
3f5a26f273 plugin XEP-0184: Implementation of XEP-0184 (Message Delivery Receipts) 2016-07-28 19:11:31 +02:00
Goffi
b148722b4d plugin XEP-0045: added bridge method to change subject 2016-07-24 18:59:02 +02:00
Geoffrey POUZET
7eb6d363d9 plugin XEP-0070: change message popup to be more user-friendly 2016-07-19 21:25:22 +02:00
Goffi
90f8473b99 plugin lang detect: added a parameter to (de)activate the detection 2016-07-17 19:43:30 +02:00
Goffi
cc160e03d7 plugin XEP-0085, quick_frontends, primitivus: chat states are working again 2016-07-17 16:47:33 +02:00
Geoffrey POUZET
9ed4c1787e plugin XEP-0070: implementation of XEP-0070 (verifying HTTP request via XMPP) 2016-07-11 20:01:05 +02:00
Goffi
93f2d8d948 plugin XEP_0249: fixed bad use of namespace in addElement 2016-07-10 12:26:42 +02:00
Goffi
79f1179723 plugin XEP-0045: fixed typo in text commands 2016-07-02 20:55:31 +02:00
Goffi
286ee2a5e2 plugin XEP-0045: added /list text command:
/list display a basic (for now) listing of available rooms in current or specified MUC service
2016-07-01 00:00:36 +02:00
Goffi
3b49db2892 plugin XEP-0045: various fixes/improvments:
- use self.txt_cmds instead of self.host.plugins["XEP-0045"]
    - nick and options in join have now default values
    - directly raise ConflictError when room is already joined instead of using defer.fail
    - removed self.host.getClient where it's now useless because client is used instead of profile
2016-07-01 00:00:23 +02:00
Goffi
71a2fe4599 plugin xep-0045: ask for password when getting a "not-allowed" error 2016-07-01 00:00:09 +02:00
Goffi
a0fb3b451f xep-0045: ignore non standard presence received between own presence and room subject 2016-06-29 13:46:14 +02:00
Goffi
96afcb28d3 plugin XEP-0054: fixed getCard calls 2016-06-28 18:27:02 +02:00
Goffi
8b425a2e44 plugin XEP-0045: fixed calls to join, nick, kick, ban and affiliate 2016-06-28 18:26:21 +02:00