comparison src/bridge/bridge_constructor/bridge_template.ini @ 1955:633b5c21aefd

backend, frontend: messages refactoring (huge commit, not finished): /!\ database schema has been modified, do a backup before updating message have been refactored, here are the main changes: - languages are now handled - all messages have an uid (internal to SàT) - message updating is anticipated - subject is now first class - new naming scheme is used newMessage => messageNew, getHistory => historyGet, sendMessage => messageSend - minimal compatibility refactoring in quick_frontend/Primitivus, better refactoring should follow - threads handling - delayed messages are saved into history - info messages may also be saved in history (e.g. to keep track of people joining/leaving a room) - duplicate messages should be avoided - historyGet return messages in right order, no need to sort again - plugins have been updated to follow new features, some of them need to be reworked (e.g. OTR) - XEP-0203 (Delayed Delivery) is now fully handled in core, the plugin just handle disco and creation of a delay element - /!\ jp and Libervia are currently broken, as some features of Primitivus It has been put in one huge commit to avoid breaking messaging between changes. This is the main part of message refactoring, other commits will follow to take profit of the new features/behaviour.
author Goffi <goffi@goffi.org>
date Tue, 24 May 2016 22:11:04 +0200
parents 74676624ad5d
children a2bc5089c2eb
comparison
equal deleted inserted replaced
1943:ccfe45302a5c 1955:633b5c21aefd
32 - from: "True" if contact is registred to our presence information 32 - from: "True" if contact is registred to our presence information
33 - ask: "True" is subscription is pending 33 - ask: "True" is subscription is pending
34 doc_param_2=groups: Roster's groups where the contact is 34 doc_param_2=groups: Roster's groups where the contact is
35 doc_param_3=%(doc_profile)s 35 doc_param_3=%(doc_profile)s
36 36
37 [newMessage] 37 [messageNew]
38 type=signal 38 type=signal
39 category=core 39 category=core
40 sig_in=ssssa{ss}s 40 sig_in=sdssa{ss}a{ss}sa{ss}s
41 doc=A message has been received 41 doc=A message has been received
42 doc_param_0=from_jid: JID where the message is comming from 42 doc_param_0=uid: unique ID of the message (id specific to SàT, this it *NOT* an XMPP id)
43 doc_param_1=message: Message itself 43 doc_param_1=timestamp: when the message was sent (or declared sent for delayed messages)
44 doc_param_2=mess_type: Type of the message (cf RFC 6121 §5.2.2) + C.MESS_TYPE_INFO (system info) 44 doc_param_2=from_jid: JID where the message is comming from
45 doc_param_3=to_jid: JID where the message must be sent 45 doc_param_3=to_jid: JID where the message must be sent
46 doc_param_4=extra: extra message information 46 doc_param_4=message: message itself, can be in several languages (key is language code or '' for default)
47 doc_param_5=%(doc_profile)s 47 doc_param_5=subject: subject of the message, can be in several languages (key is language code or '' for default)
48 doc_param_6=mess_type: Type of the message (cf RFC 6121 §5.2.2) + C.MESS_TYPE_INFO (system info)
49 doc_param_7=extra: extra message information, can have data added by plugins and/or:
50 - thread: id of the thread
51 - thread_parent: id of the parent of the current thread
52 - received_timestamp: date of receiption for delayed messages
53 - delay_sender: entity which has originally sent or which has delayed the message
54 doc_param_8=%(doc_profile)s
48 55
49 [newAlert] 56 [newAlert]
50 deprecated= 57 deprecated=
51 type=signal 58 type=signal
52 category=core 59 category=core
432 doc=Get confirmations requests in queue 439 doc=Get confirmations requests in queue
433 doc_param_0=%(doc_profile_key)s 440 doc_param_0=%(doc_profile_key)s
434 doc_return=List of confirmation request data, same as for [askConfirmation] 441 doc_return=List of confirmation request data, same as for [askConfirmation]
435 442
436 443
437 [sendMessage] 444 [messageSend]
438 async= 445 async=
439 type=method 446 type=method
440 category=core 447 category=core
441 sig_in=ssssa{ss}s 448 sig_in=sa{ss}a{ss}sa{ss}s
442 sig_out= 449 sig_out=
443 param_2_default='' 450 param_2_default=''
444 param_3_default="auto" 451 param_3_default="auto"
445 param_4_default={} 452 param_4_default={}
446 param_5_default="@NONE@" 453 param_5_default="@NONE@"
447 doc=Send a message 454 doc=Send a message
448 doc_param_0=to_jid: JID of the recipient 455 doc_param_0=to_jid: JID of the recipient
449 doc_param_1=message: body of the message 456 doc_param_1=message: body of the message:
450 doc_param_2=subject: Subject of the message ('' if no subject) 457 key is the language of the body, use '' when unknown
458 doc_param_2=subject: Subject of the message
459 key is the language of the subkect, use '' when unknown
451 doc_param_3=mess_type: Type of the message (cf RFC 6121 §5.2.2) or "auto" for automatic type detection 460 doc_param_3=mess_type: Type of the message (cf RFC 6121 §5.2.2) or "auto" for automatic type detection
452 doc_param_4=extra: optional data that can be used by a plugin to build more specific messages 461 doc_param_4=extra: optional data that can be used by a plugin to build more specific messages
453 doc_param_5=%(doc_profile_key)s 462 doc_param_5=%(doc_profile_key)s
454 463
455 [setPresence] 464 [setPresence]
575 doc=Register frontend's specific parameters 584 doc=Register frontend's specific parameters
576 doc_param_0=xml: XML definition of the parameters to be added 585 doc_param_0=xml: XML definition of the parameters to be added
577 doc_param_1=%(doc_security_limit)s 586 doc_param_1=%(doc_security_limit)s
578 doc_param_2=app: name of the frontend registering the parameters 587 doc_param_2=app: name of the frontend registering the parameters
579 588
580 [getHistory] 589 [historyGet]
581 async= 590 async=
582 type=method 591 type=method
583 category=core 592 category=core
584 sig_in=ssibss 593 sig_in=ssibss
585 sig_out=a(dssssa{ss}) 594 sig_out=a(sdssa{ss}a{ss}sa{ss})
586 param_3_default=True 595 param_3_default=True
587 param_4_default='' 596 param_4_default=''
588 param_5_default="@NONE@" 597 param_5_default="@NONE@"
589 doc=Get history of a communication between two entities 598 doc=Get history of a communication between two entities
590 doc_param_0=from_jid: source JID (bare jid for catch all, full jid else) 599 doc_param_0=from_jid: source JID (bare jid for catch all, full jid else)
591 doc_param_1=to_jid: dest JID (bare jid for catch all, full jid else) 600 doc_param_1=to_jid: dest JID (bare jid for catch all, full jid else)
592 doc_param_2=limit: max number of history elements to get (0 for the whole history) 601 doc_param_2=limit: max number of history elements to get (0 for the whole history)
593 doc_param_3=between: True if we want history between the two jids (in both direction), False if we only want messages from from_jid to to_jid 602 doc_param_3=between: True if we want history between the two jids (in both direction), False if we only want messages from from_jid to to_jid
594 doc_param_4=search: pattern to filter the history results 603 doc_param_4=search: pattern to filter the history results
595 doc_param_5=%(doc_profile)s 604 doc_param_5=%(doc_profile)s
596 doc_return=Ordered list (by timestamp) of tuples (timestamp, full from_jid, full to_jid, message, type, extra) 605 doc_return=Ordered list (by timestamp) of data as in [messageNew] (without final profile)
597 606
598 [addContact] 607 [addContact]
599 type=method 608 type=method
600 category=core 609 category=core
601 sig_in=ss 610 sig_in=ss