25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00
Commit Graph

3315 Commits

Author SHA1 Message Date
Alexey Shchepin
d88d5d6807 Support presence_broadcast in default_room_options mod_muc option 2015-12-21 02:25:31 +03:00
Holger Weiss
2d22507636 ejabberd_http: Cope with large POST/PUT requests
gen_tcp returns 'enomem' if we try to receive more than 64 MiB.
2015-12-20 23:30:11 +01:00
Holger Weiss
d039b9b72b ejabberd_http: Log debug message on receive errors 2015-12-20 23:26:57 +01:00
Christophe Romain
bb5a8a42c3 Fix pubsub virtual nodetree plugin 2015-12-17 10:16:17 +01:00
Christophe Romain
6957e892dd Fix last item message type as message attribute 2015-12-16 17:04:45 +01:00
Christophe Romain
c8986ffa5e Use correct notification_type for last items (#827) 2015-12-16 16:19:35 +01:00
Alexey Shchepin
c6798fc515 Add accept_interval option in ejabberd_listener 2015-12-16 17:26:44 +03:00
Christophe Romain
08b0530164 Don't read pubsub options when plugin does not use them
This also revert commit 6052f7b
2015-12-16 12:56:06 +01:00
Holger Weiss
5fd1aa0d04 Advertise MAM in disco info for account/room JID
As per XEP-0313 version 0.2 and newer, advertise the MAM feature in the
service discovery information for the bare account (or MUC room) JID.

Some clients check the server's discovery information instead, so we'll
continue to advertise the feature there as well.
2015-12-16 00:08:23 +01:00
Holger Weiss
11ad96fced Use MUC domain for 'by' attribute of <stanza-id/>
Let mod_mam specify only the domain part of the room JID in the 'by'
attribute of <stanza-id/> tags.
2015-12-15 21:37:41 +01:00
Holger Weiss
0e330da2a6 mod_mam: Keep 'to' attribute for MUC MAM messages 2015-12-15 21:05:04 +01:00
Christophe Romain
6efdf78ce3 PubSub plugin for online users only 2015-12-15 16:23:04 +01:00
Christophe Romain
3b69d26368 Fix pubsub headers 2015-12-15 16:12:20 +01:00
Paweł Chmielowski
6052f7bfa8 Fix pubsub test error 2015-12-14 10:21:23 +01:00
Christophe Romain
e3005f68e7 Remove undefined macro injected in 3bdd5d0d 2015-12-11 15:33:22 +01:00
Christophe Romain
8ee5f9fb6f Remove http supervisors 2015-12-11 14:13:24 +01:00
Christophe Romain
3bdd5d0d25 Remove receiver's supervisor 2015-12-11 14:11:44 +01:00
Christophe Romain
1a32f20c07 Disable use of multi-subscribe and subscription-option on standard plugins 2015-12-11 12:46:49 +01:00
Christophe Romain
6357ea1d5d Limit number of subscriptions per node and allow custom default node configuration 2015-12-11 12:46:44 +01:00
Christophe Romain
86a8606fd1 Virtual nodetree is not attached to any backend 2015-12-11 12:46:40 +01:00
Christophe Romain
c4943cffe8 Follow pubsub configuration when using virtual nodetree 2015-12-11 12:46:35 +01:00
Christophe Romain
10c920ef13 Don't force max_items_node to MAXITEMS if not defined 2015-12-11 12:30:16 +01:00
Holger Weiss
469e93f37b mod_mam: Don't store resent messages
Make sure messages that were resent by the stream management code aren't
stored in MAM.
2015-12-09 22:44:45 +01:00
Holger Weiss
e09afe367f Document XEP-0334 support 2015-12-09 22:28:44 +01:00
Evgeniy Khramtsov
4c47ee63f2 Do not forget to include xmlns in mam prefs response (#859) 2015-12-09 12:53:02 +03:00
Paweł Chmielowski
be4d687a86 Fix problem with handling of old db entries in mod_mam 2015-12-09 09:47:03 +01:00
Holger Weiss
07baf2d973 Don't let "reopen_log" rotate files (EJAB-1243)
Make sure the "reopen_log" command really just reopens log files without
also rotating them.  For rotating log files, the new "rotate_log"
command can be used.
2015-12-08 22:48:04 +01:00
Holger Weiss
325c17f277 mod_mam: Update record field type 2015-12-08 22:21:39 +01:00
Holger Weiss
14609dbfa2 mod_mam: Remove unused code 2015-12-08 22:15:55 +01:00
Holger Weiss
59ba09826b mod_offline: Fix outdated comments 2015-12-08 21:58:54 +01:00
Holger Weiss
90fd7f3780 mod_offline: Honor <store/> hint
Ignore the "store_empty_body" option for messages that have a <store/>
hint as described in XEP-0334, version 0.2.
2015-12-08 21:46:36 +01:00
Alexey Shchepin
c2f6bf0343 Improve muc#roomconfig_presencebroadcast support 2015-12-08 21:53:42 +03:00
Paweł Chmielowski
67f93b0d60 Don't keep 10 sec timeout that i used for testing... 2015-12-08 11:28:03 +01:00
Paweł Chmielowski
7a69dab596 Add ability to disable timeout for ejabberdctl command 2015-12-08 11:25:26 +01:00
Holger Weiss
5ce0b062ff mod_mam: Honor Message Processing Hints (XEP-0334) 2015-12-08 00:10:00 +01:00
Badlop
3e57850da7 If mod_register access_from is 'none', then don't advertise IBR (#857) 2015-12-07 18:30:52 +01:00
Paweł Chmielowski
95a9100623 Fix more places where random:seed is used 2015-12-07 16:48:29 +01:00
Paweł Chmielowski
d0df7be722 Fix randoms.erl on R17 that don't have random:seed(integer()) 2015-12-07 16:37:40 +01:00
Paweł Chmielowski
5ac10d6555 Remove now() in pubsub code 2015-12-07 16:16:11 +01:00
Paweł Chmielowski
29db302808 More now() replacements 2015-12-07 16:09:48 +01:00
Paweł Chmielowski
b9f751e099 Fix bug in last commit 2015-12-07 10:26:51 +01:00
Paweł Chmielowski
0a846d03bf More now() removal 2015-12-06 15:58:46 +01:00
Paweł Chmielowski
5c329a7699 Remove now() - part 1 2015-12-04 15:08:43 +01:00
Badlop
daad71bc7e trusted_proxies option not parsed correctly (#860) 2015-12-04 13:14:39 +01:00
Holger Weiss
ba916c3162 XEP-0198: Fix stanza counting corner case issue
Don't forget to count outgoing stanzas that are processed while the
ejabberd_c2s process is already waiting for stream resumption.
2015-12-02 19:25:10 +01:00
Badlop
f9e12d900c No need for a top menu link as there's a top page link 2015-12-02 17:10:23 +01:00
Badlop
e412438aba When user joins logged room, he must be warned (EJAB-726) 2015-12-02 12:07:29 +01:00
Badlop
086fbc6a50 Only filter rooms in Service Disco when more than 100 (EJAB-343) 2015-12-02 02:32:25 +01:00
Badlop
ff22782752 List in Service Disco non-empty rooms and provide Node for empty (EJAB-343) 2015-12-02 01:51:39 +01:00
Mickael Remond
e5ae35c66b Update cache_tab app name 2015-12-01 19:17:51 +01:00
Evgeny Khramtsov
3397a9be5e Merge pull request #849 from weiss/discard-chat-states
mod_offline: Support discarding chat state notifications
2015-12-01 14:57:49 +03:00
Evgeniy Khramtsov
f1ecbf80fb Fix archive preference retreiving (#848) 2015-12-01 14:06:23 +03:00
Christophe Romain
9eeee67da7 Webadmin console visual refresh (thanks to Marek Foss) (EJAB-1142) 2015-11-30 11:35:53 +01:00
Evgeniy Khramtsov
9cc5a5d467 Simplify external components configuration 2015-11-28 17:38:34 +03:00
Holger Weiss
44f5e411c5 mod_offline: Support discarding chat states
XEP-0160 says that standalone chat state notifications should not be
stored offline.  By default, mod_offline discards them now.

Closes #842.
2015-11-26 08:35:49 +01:00
Holger Weiss
fee2530b1c Always use occupant JID as 'from' for room subject
When sending the room subject to a new participant, always use the
occupant JID that corresponds to the subject author as the 'from'
address.  It was already done this way when the subject was sent as part
of the room history.
2015-11-25 00:05:24 +01:00
Evgeniy Khramtsov
87fb5132be Make JID related functions from jlib.erl deprecated 2015-11-24 20:31:26 +03:00
Evgeniy Khramtsov
95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Christophe Romain
16881597c9 Remove useless export_all flag 2015-11-23 12:03:08 +01:00
Christophe Romain
f3ff660eae Export content_type/3 needed by mod_http_upload 2015-11-23 11:53:36 +01:00
Christophe Romain
4480749a52 Merge branch 'cluster_fix' 2015-11-20 14:52:36 +01:00
Christophe Romain
b4ae1b63bc Allow longer command execution time 2015-11-20 10:39:32 +01:00
Christophe Romain
67a70b9107 Integrate join/leave cluster as ejabberd command 2015-11-20 10:39:27 +01:00
Evgeny Khramtsov
0e29307ad5 Merge pull request #840 from cenobites/mod_ping
Adding ping_ack_timeout in mod_opt_type configuration
2015-11-18 16:35:49 +03:00
Badlop
2659e2c4a0 Explain that reload_config only affects to ACL and Access 2015-11-18 13:25:19 +01:00
Nycholas de Oliveira e Oliveira
49a8de7c56 Adding ping_ack_timeout in mod_opt_type configuration
Avoid the error output

```
2015-11-18 12:02:40.297 [error] <0.37.0>@gen_mod:validate_opts:250 unknown option 'ping_ack_timeout' for module 'mod_ping' will be likely ignored, available options are: 'iqdisc', 'ping_interval', 'send_pings', 'timeout_action'
2015-11-18 12:02:40.334 [error] <0.37.0>@gen_mod:validate_opts:250 unknown option 'ping_ack_timeout' for module 'mod_ping' will be likely ignored, available options are: 'iqdisc', 'ping_interval', 'send_pings', 'timeout_action'
```

In setting mod_opt_type default, ping_ack_timeout parameter was added.
2015-11-18 10:25:01 -02:00
Holger Weiss
43626f5c97 mod_http_upload: Return error atoms, not strings
Don't convert error atoms to strings before actually logging them.  This
avoids a bogus error message when a user who has no uploaded files is
removed.
2015-11-17 00:12:20 +01:00
Badlop
53d72bd85a Disable vJUD by default also in mod_vcard_ldap source code 2015-11-13 19:33:23 +01:00
Badlop
f6d8f47451 Disable vJUD search in the default config and when not specified 2015-11-13 19:30:11 +01:00
Alexey Shchepin
aa5caa30e2 Support for muc#roomconfig_presencebroadcast option 2015-11-12 19:53:10 +03:00
Paweł Chmielowski
3ee5195b7a Fix problem with pipelined http requests arriving in single packet
This fixes github issue ejabberd#835
2015-11-12 17:23:59 +01:00
Holger Weiss
55a92c2983 mod_http_upload: Log message if URL looks wrong
Log an [info] message if a PUT request looks like the specified
"put_url" contains a path component that doesn't match the
"request_handlers" path, as in the following configuration:

  listen:
    -
      module: ejabberd_http
      port: 5444
      request_handlers:
        "/": mod_http_upload

  modules:
    mod_http_upload:
      put_url: "http://example.com/path/"
2015-11-11 22:51:40 +01:00
Holger Weiss
415a75c25a mod_http_upload_quota: Don't track all users
Don't track the disk usage of accounts that have an unlimited quota.
2015-11-10 22:08:16 +01:00
Holger Weiss
20709f9880 mod_http_upload: Make case indentation consistent
Use four spaces (or the corresponding amount of tab characters) for case
indentation everywhere in mod_http_upload and mod_http_upload_quota.
2015-11-09 19:23:52 +01:00
Holger Weiss
113c315857 mod_http_upload: Apply cosmetic changes 2015-11-09 19:12:08 +01:00
Holger Weiss
842db2ca15 mod_http_upload: Don't flatten command strings 2015-11-09 18:50:45 +01:00
Holger Weiss
9c80cb2b26 mod_http_upload: Don't let identify/1 return error
Let identify/1 return 'pass' when it failed to identify the file type,
as this doesn't (necessarily) indicate an error condition.  This also
makes it consistent with the return value of convert/2.
2015-11-09 18:41:31 +01:00
Paweł Chmielowski
58c1bc4276 Use xml_stream:reset() when possible 2015-11-09 16:05:09 +01:00
Christophe Romain
341be9b682 Remove supervisor option, disable it for c2s and muc 2015-11-04 16:24:35 +01:00
Holger Weiss
fec7e47169 Add copyright and license to HTTP upload modules 2015-11-04 01:22:39 +01:00
Holger Weiss
46bf190fd0 mod_client_state: Add my email address to header 2015-11-04 01:19:19 +01:00
Paweł Chmielowski
e54e543a66 Faster string_to_jid/1 implementation
This version is about 10-15% faster than old one
2015-11-03 14:41:01 +01:00
Holger Weiss
ff46738218 mod_http_upload_quota: Omit info message
The mod_http_upload_quota module attempts to delete a directory whenever
it removes a file from that directory.  However, if thumbnail creation
is enabled, directories will often contain two files.  Therefore, don't
log an info (but only a debug) message if directory removal fails.
2015-11-03 00:00:44 +01:00
Holger Weiss
4566325241 mod_http_upload: Don't complain during shutdown
Ignore the case where, for some reason, no process is found to be
stopped.

Closes #810.
2015-11-02 23:46:58 +01:00
Holger Weiss
1b368a86b7 mod_http_upload: Use binary strings in most places
Switch to binary strings to fix a type issue, and for consistency.

Closes #808.
2015-11-02 23:46:31 +01:00
Holger Weiss
9d2f1d5f0d mod_http_upload: Check availability of ImageMagick
Log an error message during startup if the thumbnail option is enabled
but ImageMagick is not installed.
2015-11-02 01:12:10 +01:00
Holger Weiss
eeb705fc2f mod_http_upload: Suppress error on non-image files
Don't log an error (but only a debug) message if ImageMagick fails to
indentify the file type for thumbnail creation.  The image might be
encrypted, or it could be a non-image file.

Closes #809.
2015-11-01 23:29:22 +01:00
Evgeniy Khramtsov
8bff06bea9 Merge branch 'master' of github.com:processone/ejabberd 2015-10-30 17:20:50 +03:00
Evgeniy Khramtsov
99f506135b Fix ipv6 configuration processing (#803) 2015-10-30 17:20:32 +03:00
Holger Weiss
915383e150 mod_http_upload: Add missing trailing dot
(Thanks to Matthias Rieber.)
2015-10-29 10:09:55 +01:00
Holger Weiss
43e7814714 mod_mam: Update supported XEP version 2015-10-28 23:53:53 +01:00
Holger Weiss
32fe74c923 mod_http_upload: Document protocol support 2015-10-28 23:52:33 +01:00
Holger Weiss
62ea763089 mod_http_upload: Fix string()/binary() type issue 2015-10-26 22:32:12 +01:00
Holger Weiss
3e7ee6af6d mod_http_upload: Add/fix function specifications 2015-10-26 22:30:58 +01:00
Holger Weiss
b5a09f8b15 mod_http_upload: Strip newline from command output
The list_to_integer/1 function doesn't cope with trailing newline
characters.
2015-10-26 22:10:32 +01:00
Holger Weiss
5dfd95e5a7 Support user quotas for HTTP File Upload
mod_http_upload_quota implements two features:

- When a "hard quota" is exceeded during a file upload, old files are
  removed until the disk usage equals or falls below the "soft quota".

- Once a day, all uploaded files (and directories) older than a
  configurable number of days are deleted.
2015-10-26 13:10:10 +01:00
Evgeniy Khramtsov
6f2e178de1 Rename badly entitled record field 2015-10-26 15:05:28 +03:00
Evgeniy Khramtsov
137a4ee087 Add HTTP File Upload support (XEP-0363) 2015-10-26 14:10:55 +03:00
Evgeniy Khramtsov
b2eb9f197a Don't crash on certificates without extensions (EJAB-1724) 2015-10-23 18:41:35 +03:00
Christophe Romain
2a115a83d2 Let modules_update_specs report failures (#756) 2015-10-23 17:21:19 +02:00