Badlop
589521bfd8
Update copyright year to 2024 ( #4139 )
2024-01-22 17:29:13 +01:00
Paweł Chmielowski
f75909db4c
Allow pubsub node owner to overwrite items published by other persons
...
Owner is already permitted to delete those items, so it could do that by
deleting old item, and publishing it again, so i don't see reason to not
allow that overwrite.
2023-10-12 13:16:32 +02:00
Badlop
243697e25a
Update copyright year to 2023 ( #3967 )
2023-01-10 13:52:04 +01:00
Badlop
b3211b1f71
Update copyright year to 2022
2022-02-11 09:39:25 +01:00
Holger Weiss
29dcc9b94c
PubSub: Add delete_expired_pubsub_items command
...
Support XEP-0060's pubsub#item_expire feature by adding a command for
deleting expired PubSub items.
Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-10-30 13:19:30 +02:00
Holger Weiss
c952cc420b
node_flat_sql: Avoid catch-all clauses for RSM
...
Explicitly catch invalid <before/> and <after/> timestamps specified by
clients in RSM queries, but crash on other errors, rather than silently
ignoring those.
2021-08-23 21:28:15 +02:00
Holger Weiss
8d5025076f
PubSub: Add delete_old_pubsub_items command
...
Add a command for keeping only the specified number of items on each
node and removing all older items. This might be especially useful if
nodes may be configured to have no 'max_items' limit.
Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-22 12:44:50 +02:00
Holger Weiss
29751a6174
PubSub: Optimize publishing on large nodes (SQL)
...
Avoid an unnecessary SQL query while publishing an item on a PubSub node
without 'max_items' limit. The query in question can be expensive if
the node has a large number of items.
Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 20:02:58 +02:00
Holger Weiss
1b0e59bb13
PubSub: Support unlimited number of items
...
Allow for setting the mod_pubsub option 'max_items_node' to 'unlimited'.
If clients then request a 'max_items' limit of 'max', old items aren't
deleted when publishing new ones.
Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 12:29:37 +02:00
Badlop
6e0161470e
Update newest copyright year to 2021 ( #3464 )
2021-01-27 17:02:06 +01:00
Stu Tomlinson
bd11a00f8f
Use include_lib() to include headers from dependencies ( #3369 )
2020-09-03 13:45:57 +02:00
yuriyz-w
44528d3fef
Make SQL query more generic for MSSQL compatibility ( #3271 )
2020-05-15 09:19:55 +02:00
Paweł Chmielowski
2d707cc0d2
Fix type of computed field in node_flat sql query
2020-03-18 14:05:05 +01:00
Alexey Shchepin
b2f536ec8b
Use SQL ESCAPE statement only with MSSQL and SQLite, improve compatibility with CockroachDB ( #3074 )
2020-02-04 04:53:54 +03:00
Paweł Chmielowski
fdb7e3e3fa
Optimize sql queries in pubsub select_affiliation_subscriptions
2020-01-31 11:43:41 +01:00
Badlop
2d32c66fd7
Update copyright to 2020 ( #3149 )
2020-01-28 15:49:23 +01:00
Alexey Shchepin
24ac62eabd
Improve compatibility with CockroachDB ( #3074 )
2019-12-16 06:52:06 +03:00
Paweł Chmielowski
51bf552c3f
For pubsub items with max_item = 1 use order by in sql queries
2019-07-31 13:06:44 +02:00
Evgeny Khramtsov
2da168cf05
Improve handling of errors in pubsub code
2019-07-29 17:13:16 +03:00
Evgeny Khramtsov
38b2e099d5
Fix pending nodes retrieval for SQL backend
...
Thanks to Christophe Romain
2019-07-17 12:34:09 +03:00
Evgeny Khramtsov
00f2a736eb
Improve extraction of translated strings
...
Now every such string MUST be encapsulated into ?T() macro.
The macro itself is defined in include/translate.hrl.
Example:
-module(foo).
-export([bar/1]).
-include("translate.hrl").
bar(Lang) ->
translate:translate(Lang, ?T("baz")).
2019-06-22 17:08:45 +03:00
Evgeny Khramtsov
a02cff0e78
Use new configuration validator
2019-06-14 12:33:26 +03:00
Paweł Chmielowski
538f35d05a
Replace code using p1_time_compat wrapper with native functions
...
Since we now require R19, we shouldn't need that anymore.
There are still couple places where p1_time_compat:unique_timestamp() is
used as there is no direct equivalent.
2019-02-27 09:56:31 +01:00
Badlop
55417dfb37
Update copyright to 2019 ( #2756 )
2019-01-08 22:53:27 +01:00
Evgeniy Khramtsov
fd8e07af47
Get rid of ejabberd.hrl header
...
The header consisted of too many unrelated stuff and macros misuse.
Some stuff is moved into scram.hrl and type_compat.hrl.
All macros have been replaced with the corresponding function calls.
TODO: probably type_compat.hrl is not even needed anymore since
we support only Erlang >= OTP 17.5
2018-06-14 14:00:47 +03:00
Evgeniy Khramtsov
cdc7c1d1ed
Update copyright dates
2018-01-05 23:18:58 +03:00
Christophe Romain
08e54dd621
Don't force rsm when max_items is not defined ( #2189 )
2017-12-28 11:48:54 +01:00
Christophe Romain
42932fd19e
PubSub: Add missing Nidx building records from sql result
2017-12-13 11:35:36 +01:00
Christophe Romain
44700d91ba
PubSub: Cleanup tree requests, rename pubsub_node.type->pubsub_node.plugin
2017-11-16 11:38:04 +01:00
Christophe Romain
e706e24b92
Cleanup pubsub subscriptions quering, fix pep case
2017-11-15 11:16:15 +01:00
Christophe Romain
ce7acafe37
Remove useless condition
2017-09-27 20:40:07 +02:00
Christophe Romain
3c8308bb8d
PubSub: enforce controls on publish and delete
2017-09-27 17:37:38 +02:00
Christophe Romain
8c026582ab
Fix xref error
2017-09-27 12:34:40 +02:00
Christophe Romain
22435ca562
Remove calls to deprecated functions
2017-09-27 11:43:59 +02:00
Christophe Romain
d120e0ad91
PubSub: add correct order when requesting all items
2017-09-27 11:12:01 +02:00
Christophe Romain
07a193d4dc
PubSub: fix RSM support ( #1994 )(#2Â014)
2017-09-27 10:51:37 +02:00
Christophe Romain
b1acd1183f
Rename aux.erl as misc.erl
...
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Christophe Romain
c93bf732db
Refactor pubsub's get_last_items
2017-03-30 14:26:30 +02:00
Evgeniy Khramtsov
7bcbea2108
Deprecate jlib.erl in favor of aux.erl
...
Since the main goal of jlib.erl is lost, all auxiliary functions
are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-03-30 14:17:13 +03:00
Christophe Romain
70050b52ad
Use item creation date in rsm order ( #1516 )
2017-03-21 12:45:41 +01:00
Evgeniy Khramtsov
c1439ddd5b
Get rid of jid:to_string/1 and jid:from_string/1
2017-02-26 10:07:12 +03:00
Badlop
5fdd1c39fe
Update copyright date automatically ( #1442 )
2017-01-02 21:42:06 +01:00
Christophe Romain
bcc04d93e1
Enforce pubsub node removal, revert previous commit ( #1320 )
...
This reverts commit 2976c2d921
.
and enforce node purge/removal instead
2016-12-09 12:51:08 +01:00
Christophe Romain
2976c2d921
Enforce affiliation removal, remove corresponding items ( #1320 )
2016-12-09 11:35:51 +01:00
Christophe Romain
2929f5b5bc
Minor cosmetic changes on pubsub code
2016-11-15 18:35:20 +01:00
Evgeniy Khramtsov
78a44e0176
Merge branch 'master' into xml-ng
...
Conflicts:
src/adhoc.erl
src/cyrsasl_oauth.erl
src/ejabberd_c2s.erl
src/ejabberd_config.erl
src/ejabberd_service.erl
src/gen_mod.erl
src/mod_admin_extra.erl
src/mod_announce.erl
src/mod_carboncopy.erl
src/mod_client_state.erl
src/mod_configure.erl
src/mod_echo.erl
src/mod_mam.erl
src/mod_muc.erl
src/mod_muc_room.erl
src/mod_offline.erl
src/mod_pubsub.erl
src/mod_stats.erl
src/node_flat_sql.erl
src/randoms.erl
2016-11-12 13:27:15 +03:00
Badlop
2ab72bcd00
Nidx may be integer or binary, so use jlib:i2l instead
...
As reported in
https://www.ejabberd.im/forum/28580/erlang-function-integertobinary1-throwing-badargs-exception
2016-10-20 21:56:19 +02:00
Evgeniy Khramtsov
6a3691ef7c
Add xdata generator and make some code using it
2016-10-07 10:31:03 +03:00
Christophe Romain
1de0bb83a0
PubSub: creation jid must be bare jid
2016-09-30 07:51:33 +03:00
Christophe Romain
7566e267a7
PubSub: fix error type on item deletion with insufficient priviledge
2016-09-30 07:51:17 +03:00