Commit Graph

119 Commits

Author SHA1 Message Date
Alexey Shchepin 2905b90c41 Update copyright dates 2012-02-23 17:47:43 +02:00
Badlop aa8c9bf0a5 Name and groups must be binaries, not strings 2011-07-28 16:58:58 +02:00
Badlop ff8bd0c2ec Support static_modules in mod_caps, ping, privacy, private, roster, stats and time 2011-07-15 02:50:04 +02:00
Badlop b8026d8df7 Reorganize the push_item function, and handle version not_found (EJAB-1420) 2011-04-29 20:34:38 +02:00
Badlop c611361bbe No need to inform that XEP-0237 is optional; clarified in XEP version 1.2 2011-04-29 20:34:36 +02:00
Christophe Romain 4a2005f7cc update copyright up to 2011 2011-02-14 13:47:22 +01:00
Pablo Polvorin 70a2200888 Fix initial presence after roster subscription approval (EJAB-1384)
Send initial presence after the roster subscription workflow
is complete.
2011-01-27 11:05:16 -03:00
Pablo Polvorin ef572c815f Port to latest exmpp changes (attribute names as binary()).
All atributes are now binary() instead of atoms.
2010-11-29 16:44:31 -03:00
Badlop 62b3b31b8d Allow webadmins to change roster of user (EJAB-72) 2010-09-21 17:05:50 +02:00
Badlop 9bde1dc9af Add missing needdb, use bare jid to get roster; now group and subs blocking works again (thanks to Andreas Köhler) 2010-09-17 21:06:30 +02:00
Badlop dffb9cdaf9 Fix Dialyzer reports 2010-08-13 17:41:05 +02:00
Badlop 8a5b08e3f0 New access option in mod_roster to disable changes (EJAB-72) 2010-07-30 13:21:58 +02:00
Badlop 597c1c87d4 Fix ejabberd modules 2010-07-23 00:30:32 +02:00
Badlop eb2ad7e699 Patch modules for GS (thanks to Stephan Maka) 2010-07-23 00:29:40 +02:00
Badlop a1a6bd79ac Patch mnesia modules for MH (thanks to Alexey Shchepin and Geoff Cant) 2010-07-23 00:29:30 +02:00
Badlop fe4944e031 Provide iq instead of xmlel in roster webadmin changes 2010-06-18 21:24:51 +02:00
Badlop 67da88f0bd Improve ejabberd's broadcast stanzas to satisfy #xmlel type 2010-06-18 21:24:51 +02:00
Badlop 7471d49b5a Fix roster display in WebAdmin 2010-04-14 16:42:29 +02:00
Badlop c9463e3308 Fix resending authorization problem 2010-02-24 13:14:53 +01:00
Badlop 55986739c9 Update namespaces to match exmpp_nss.hrl (thanks to Karim Gemayel)(EJAB-1179)
This requires a recent exmpp from Git. Once released, it'll require exmpp 0.9.3
2010-02-16 17:33:53 +01:00
Badlop 1bcd481fdc Update year of ProcessOne copyright from 2009 to 2010 (EJAB-1159)
SVN Revision: 2892
2010-01-12 16:15:16 +00:00
Badlop 007cafa7cd Fix EDoc errors.
SVN Revision: 2495
2009-08-17 17:17:34 +00:00
Badlop 4f6b67b190 Move functions from roster_versioning to mod_roster (EJAB-964)
SVN Revision: 2431
2009-08-06 21:07:18 +00:00
Pablo Polvorin 1b85310f1a Support for roster versioning (EJAB-964)
Introduces two options for mod_roster and mod_roster_odbc:
- {versioning, true | false}   Enable or disable roster versioning on ejabberd.
- {store_current_id, true | false}   If true, the current roster version is stored on DB (internal or odbc). Otherwise it is calculated on the fly each time.

Performance:
Setting store_current_id to true should help in reducing the load for both ejabberd and the DB.

Details: 
If store_current_id is false,  the roster version is a hash of the entire roster. If store_current_id is true, the roster version is a hash, but of the current time
(this has to do with transactional semantics; we need to perform both the roster update and the version update on the same transaction, but we don't   
have the entire roster when we are changing a single item on DB. Loading it there requires significant changes to be introduced, so I opted for this simpler approach).

In either case, there is no difference for the clients, the roster version ID is opaque.

IMPORTANT:
mod_shared_roster is not compatible with the option 'store_current_id'.  Shared roster and roster versioning can be both enabled, but store_current_id MUST be set to false.

SVN Revision: 2428
2009-08-06 15:45:13 +00:00
Pablo Polvorin 92ad67a814 Fix problems when deleting a roster item.
The deleted item was left on the user roster, and unsubscribe presence stanza wasn't sent to the unsubscribed user.

SVN Revision: 2420
2009-08-05 17:39:47 +00:00
Badlop 2b6f45e4c1 Update some calls from jlib:make_jid to exmpp_jid:make
SVN Revision: 2139
2009-06-01 23:44:55 +00:00
Karim Gemayel 9abe47f350 API renaming : jid_to_binary -> to_binary
SVN Revision: 2134
2009-06-01 16:59:08 +00:00
Karim Gemayel 7a884ced32 API renaming : bare_jid_to_list -> bare_to_list
SVN Revision: 2133
2009-06-01 16:54:33 +00:00
Karim Gemayel 15bc238297 API renaming : jid_to_list -> to_list
SVN Revision: 2131
2009-06-01 16:52:14 +00:00
Karim Gemayel d5f2c41f26 API renaming : lnode -> prep_node
SVN Revision: 2125
2009-06-01 16:39:36 +00:00
Karim Gemayel 7eb395b87d API renaming : ldomain_as_list -> prep_domain_as_list
SVN Revision: 2124
2009-06-01 16:38:28 +00:00
Karim Gemayel 19d7d79229 API renaming : ldomain -> prep_domain
SVN Revision: 2123
2009-06-01 16:37:15 +00:00
Karim Gemayel 526dc54173 API renaming : parse_jid -> parse
SVN Revision: 2122
2009-06-01 16:35:55 +00:00
Karim Gemayel 5dbc4f9954 API renaming : jid_to_bare_jid > bare
SVN Revision: 2120
2009-06-01 16:30:15 +00:00
Karim Gemayel 447d3818f5 API renaming : make_jid -> make
SVN Revision: 2119
2009-06-01 16:26:00 +00:00
Badlop 0bbbf468f0 Fix crashes when browsing some WebAdmin pages (EJAB-821)
SVN Revision: 2111
2009-05-27 17:29:58 +00:00
Badlop 1d3947c0da Replace TYPE/1 with is_TYPE/1 (EJAB-922)
SVN Revision: 2057
2009-05-06 16:54:43 +00:00
Badlop 23ec55975e Merge 1877 from trunk.
* src/mod_roster.erl: When account is deleted, cancel presence
subscription for all roster items (EJAB-790)
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 1943
2009-03-03 18:57:47 +00:00
Pablo Polvorin acae6e20de * Use exmpp_jid:to_binary/1 when possible.
* ejabberd_odbc:escape/1 now can escape binaries too. This 
avoid the need to convert a binary value to list() just to 
sql-escape it. The escaped value returned is allways a list() 
(ejabberd's odbc drivers only works on lists())

SVN Revision: 1914
2009-02-23 19:45:55 +00:00
Pablo Polvorin 4956259124 src/mod_roster.erl: Bugfix in remove_user/2, values already in binary() format.
SVN Revision: 1909
2009-02-21 18:07:37 +00:00
Jean-Sébastien Pédron bf82bac328 o Document the type of the argument(s) and the returned type of every
functions.
o  Add guardians expression to exported functions to ensure at an early
stage that we were given the right arguments.
o  Fix table conversion to exmpp; many fields were left as string(),
preventing matching from working correctly.
o  In user_roster_item_parse_query/4, fix a bug where the same variable
was used for two distinct purpose.
o  In user_roster_item_parse_query/4, fix a bad usage of
exmpp_jid:jid_to_list/1.

PR:		EJABP-1

SVN Revision: 1867
2009-02-06 13:43:40 +00:00
Jean-Sébastien Pédron 842ebfcca0 A lot of bug fixes regarding attribute values type:
o  Fix some bugs by getting attributes as list() instead of binary().
o  Instead creating #xmlattr directly, use the new ?XMLATTR macro; it'll
take care of the anything-to-binary() conversion.
o  Fix a bug where recipient and sender were used as binary() instead of
list(), which is required by the rest of the S2S code.
o  Fix a bug where binary_to_list/1 was called on a list().

Now concerning JIDs :
o  Now that #jid{} isn't part of the API of Exmppp anymore, replace
remaining direct usages by calls to exmpp_jid.
o  Replace exmpp_jid:make_bare_jid() by exmpp_jid:make_jid().
o  Replace exmpp_jid:*_to_jid/1 by exmpp_jid:parse_jid/1.

PR:		EJABP-1

SVN Revision: 1841
2009-01-21 13:34:26 +00:00
Jean-Sébastien Pédron fc77b48344 Merge from trunk (r1804 to r1829).
The merge party is over, you may now double-check that everything is in
place.

PR:		EJABP-1

SVN Revision: 1830
2009-01-19 15:27:07 +00:00
Jean-Sébastien Pédron ff500d8297 Merge from trunk (r1787 to r1804).
Included are fixes to src/mod_configure.erl and src/mod_caps.erl.

Note: this merge doesn't include the following revisions because it was
made by previous commits:
r1766, r1768, r1781, r1783, r1794, r1797, r1799, r1802.

Warning: Ejabberd may be broken until the merge is completly finished.

PR:		EJABP-1

SVN Revision: 1829
2009-01-19 14:47:33 +00:00
Jean-Sébastien Pédron 25009ff9f4 Merge from trunk (r1764 to r1787).
Warning: Ejabberd may be broken until the merge is completly finished.

PR:		EJABP-1

SVN Revision: 1827
2009-01-19 11:59:40 +00:00
Pablo Polvorin c77f7e727b Update gen_iq_handler API, require the 'Host' argument to be in binary() format.
Fix bug in vcard user search, odbc backend.

SVN Revision: 1796
2009-01-10 16:10:12 +00:00
Pablo Polvorin 98f51dc91f Adapt to new exmpp API where get_id/1, get_lang/1, get_initiating_entity/1, get_receiving_entity/1 and get_type/1 returns binary().
SVN Revision: 1791
2009-01-09 19:18:46 +00:00
Pablo Polvorin e0e58711bb XML attributes as binary(). Change Node argument to binary in the following hooks:
disco_local_items, disco_local_features, disco_local_identity, disco_sm_items and 
disco_sm_identity.

SVN Revision: 1780
2009-01-08 14:54:00 +00:00
Pablo Polvorin 2cbd61f268 Fix typo in mod_roster
SVN Revision: 1773
2009-01-05 15:41:53 +00:00
Pablo Polvorin 4827db4f56 Big #jid to binary() conversion.
Internal tables (ejabberd_router, ejabberd_sm, ejabberd_hooks, mod_last, mod_roster) use binary() as storage.
Basic test using the ODBC backend.

SVN Revision: 1770
2009-01-03 15:15:38 +00:00