From 99e25a9093b7a1cc66b7784e3b805b60f092f9da Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 10 Mar 2019 18:05:08 +0100 Subject: doc/net.server: Document the new server.listen() API --- doc/net.server.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/net.server.lua b/doc/net.server.lua index 7342c549..aa9a4a9d 100644 --- a/doc/net.server.lua +++ b/doc/net.server.lua @@ -160,6 +160,26 @@ Returns: local function addserver(address, port, listeners, pattern, sslctx) end +--[[ Binds and listens on the given address and port +Mostly the same as addserver but with all optional arguments in a table + +Arguments: + - address: address to bind to, may be "*" to bind all addresses. will be resolved if it is a string. + - port: port to bind (as number) + - listeners: a table of listeners + - config: table of extra settings + - read_size: the amount of bytes to read or a read pattern + - tls_ctx: is a valid luasec constructor + - tls_direct: boolean true for direct TLS, false (or nil) for starttls + +Returns: + - handle + - nil, "an error message": on failure (e.g. out of file descriptors) +]] +local function listen(address, port, listeners, config) +end + + --[[ Wraps a lua-socket socket client socket in a handle. The socket must be already connected to the remote end. If `sslctx` is given, a SSL session will be negotiated before listeners are called. @@ -255,4 +275,5 @@ return { closeall = closeall; hook_signal = hook_signal; watchfd = watchfd; + listen = listen; } -- cgit v1.2.3 From 0666d291f625da2f5dbc8065c05f099d1487874c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 14 Mar 2019 16:13:14 +0000 Subject: doc/coding_style.{txt,md}: Update coding style guide --- doc/coding_style.md | 805 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 805 insertions(+) create mode 100644 doc/coding_style.md (limited to 'doc') diff --git a/doc/coding_style.md b/doc/coding_style.md new file mode 100644 index 00000000..6f34d371 --- /dev/null +++ b/doc/coding_style.md @@ -0,0 +1,805 @@ + +# Prosody Coding Style Guide + +This style guides lists the coding conventions used in the +[Prosody](https://prosody.im/) project. It is based heavily on the [style guide used by the LuaRocks project](https://github.com/luarocks/lua-style-guide). + +## Indentation and formatting + +* Prosody code is indented with tabs at the start of the line, a single + tab per logical indent level: + +```lua +for i, pkg in ipairs(packages) do + for name, version in pairs(pkg) do + if name == searched then + print(version) + end + end +end +``` + +Tab width is configurable in editors, so never assume a particular width. +Specically this means you should not mix tabs and spaces, or use tabs for +alignment of items at different indentation levels. + +* Use LF (Unix) line endings. + +## Comments + +* Comments are encouraged where necessary to explain non-obvious code. + +* In general comments should be used to explain 'why', not 'how' + +### Comment tags + +A comment may be prefixed with one of the following tags: + +* **FIXME**: Indicates a serious problem with the code that should be addressed +* **TODO**: Indicates an open task, feature request or code restructuring that + is primarily of interest to developers (otherwise it should be in the + issue tracker). +* **COMPAT**: Must be used on all code that is present only for backwards-compatibility, + and may be removed one day. For example code that is added to support old + or buggy third-party software or dependencies. + +**Example:** + +```lua +-- TODO: implement method +local function something() + -- FIXME: check conditions +end + +``` + +## Variable names + +* Variable names with larger scope should be more descriptive than those with +smaller scope. One-letter variable names should be avoided except for very +small scopes (less than ten lines) or for iterators. + +* `i` should be used only as a counter variable in for loops (either numeric for +or `ipairs`). + +* Prefer more descriptive names than `k` and `v` when iterating with `pairs`, +unless you are writing a function that operates on generic tables. + +* Use `_` for ignored variables (e.g. in for loops:) + +```lua +for _, item in ipairs(items) do + do_something_with_item(item) +end +``` + +* Generally all identifiers (variables and function names) should use `snake_case`, + i.e. lowercase words joined by `_`. + +```lua +-- bad +local OBJEcttsssss = {} +local thisIsMyObject = {} +local c = function() + -- ...stuff... +end + +-- good +local this_is_my_object = {} + +local function do_that_thing() + -- ...stuff... +end +``` + +> **Rationale:** The standard library uses lowercase APIs, with `joinedlowercase` +names, but this does not scale too well for more complex APIs. `snake_case` +tends to look good enough and not too out-of-place along side the standard +APIs. + +```lua +for _, name in pairs(names) do + -- ...stuff... +end +``` + +* Prefer using `is_` when naming boolean functions: + +```lua +-- bad +local function evil(alignment) + return alignment < 100 +end + +-- good +local function is_evil(alignment) + return alignment < 100 +end +``` + +* `UPPER_CASE` is to be used sparingly, with "constants" only. + +> **Rationale:** "Sparingly", since Lua does not have real constants. This +notation is most useful in libraries that bind C libraries, when bringing over +constants from C. + +* Do not use uppercase names starting with `_`, they are reserved by Lua. + +## Tables + +* When creating a table, prefer populating its fields all at once, if possible: + +```lua +local player = { name = "Jack", class = "Rogue" } +} +``` + +* Items should be separated by commas. If there are many items, put each + key/value on a separate line and use a semi-colon after each item (including + the last one): + +```lua +local player = { + name = "Jack"; + class = "Rogue"; +} +``` + +> **Rationale:** This makes the structure of your tables more evident at a glance. +Trailing commas make it quicker to add new fields and produces shorter diffs. + +* Use plain `key` syntax whenever possible, use `["key"]` syntax when using names +that can't be represented as identifiers and avoid mixing representations in +a declaration: + +```lua +local mytable = { + ["1394-E"] = val1, + ["UTF-8"] = val2, + ["and"] = val2, +} +``` + +## Strings + +* Use `"double quotes"` for strings; use `'single quotes'` when writing strings +that contain double quotes. + +```lua +local name = "Prosody" +local sentence = 'The name of the program is "Prosody"' +``` + +> **Rationale:** Double quotes are used as string delimiters in a larger number of +programming languages. Single quotes are useful for avoiding escaping when +using double quotes in literals. + +## Line lengths + +* There are no hard or soft limits on line lengths. Line lengths are naturally +limited by using one statement per line. If that still produces lines that are +too long (e.g. an expression that produces a line over 256-characters long, +for example), this means the expression is too complex and would do better +split into subexpressions with reasonable names. + +> **Rationale:** No one works on VT100 terminals anymore. If line lengths are a proxy +for code complexity, we should address code complexity instead of using line +breaks to fit mind-bending statements over multiple lines. + +## Function declaration syntax + +* Prefer function syntax over variable syntax. This helps differentiate between +named and anonymous functions. + +```lua +-- bad +local nope = function(name, options) + -- ...stuff... +end + +-- good +local function yup(name, options) + -- ...stuff... +end +``` + +* Perform validation early and return as early as possible. + +```lua +-- bad +local function is_good_name(name, options, arg) + local is_good = #name > 3 + is_good = is_good and #name < 30 + + -- ...stuff... + + return is_good +end + +-- good +local function is_good_name(name, options, args) + if #name < 3 or #name > 30 then + return false + end + + -- ...stuff... + + return true +end +``` + +## Function calls + +* Even though Lua allows it, generally you should not omit parentheses + for functions that take a unique string literal argument. + +```lua +-- bad +local data = get_data"KRP"..tostring(area_number) +-- good +local data = get_data("KRP"..tostring(area_number)) +local data = get_data("KRP")..tostring(area_number) +``` + +> **Rationale:** It is not obvious at a glace what the precedence rules are +when omitting the parentheses in a function call. Can you quickly tell which +of the two "good" examples in equivalent to the "bad" one? (It's the second +one). + +* You should not omit parenthesis for functions that take a unique table +argument on a single line. You may do so for table arguments that span several +lines. + +```lua +local an_instance = a_module.new { + a_parameter = 42, + another_parameter = "yay", +} +``` + +> **Rationale:** The use as in `a_module.new` above occurs alone in a statement, +so there are no precedence issues. + +## Table attributes + +* Use dot notation when accessing known properties. + +```lua +local luke = { + jedi = true, + age = 28, +} + +-- bad +local is_jedi = luke["jedi"] + +-- good +local is_jedi = luke.jedi +``` + +* Use subscript notation `[]` when accessing properties with a variable or if using a table as a list. + +```lua +local vehicles = load_vehicles_from_disk("vehicles.dat") + +if vehicles["Porsche"] then + porsche_handler(vehicles["Porsche"]) + vehicles["Porsche"] = nil +end +for name, cars in pairs(vehicles) do + regular_handler(cars) +end +``` + +> **Rationale:** Using dot notation makes it clearer that the given key is meant +to be used as a record/object field. + +## Functions in tables + +* When declaring modules and classes, declare functions external to the table definition: + +```lua +local my_module = {} + +function my_module.a_function(x) + -- code +end +``` + +* When declaring metatables, declare function internal to the table definition. + +```lua +local version_mt = { + __eq = function(a, b) + -- code + end; + __lt = function(a, b) + -- code + end; +} +``` + +> **Rationale:** Metatables contain special behavior that affect the tables +they're assigned (and are used implicitly at the call site), so it's good to +be able to get a view of the complete behavior of the metatable at a glance. + +This is not as important for objects and modules, which usually have way more +code, and which don't fit in a single screen anyway, so nesting them inside +the table does not gain much: when scrolling a longer file, it is more evident +that `check_version` is a method of `Api` if it says `function Api:check_version()` +than if it says `check_version = function()` under some indentation level. + +## Variable declaration + +* Always use `local` to declare variables. + +```lua +-- bad +superpower = get_superpower() + +-- good +local superpower = get_superpower() +``` + +> **Rationale:** Not doing so will result in global variables to avoid polluting +the global namespace. + +## Variable scope + +* Assign variables with the smallest possible scope. + +```lua +-- bad +local function good() + local name = get_name() + + test() + print("doing stuff..") + + --...other stuff... + + if name == "test" then + return false + end + + return name +end + +-- good +local bad = function() + test() + print("doing stuff..") + + --...other stuff... + + local name = get_name() + + if name == "test" then + return false + end + + return name +end +``` + +> **Rationale:** Lua has proper lexical scoping. Declaring the function later means that its +scope is smaller, so this makes it easier to check for the effects of a variable. + +## Conditional expressions + +* False and nil are falsy in conditional expressions. Use shortcuts when you +can, unless you need to know the difference between false and nil. + +```lua +-- bad +if name ~= nil then + -- ...stuff... +end + +-- good +if name then + -- ...stuff... +end +``` + +* Avoid designing APIs which depend on the difference between `nil` and `false`. + +* Use the `and`/`or` idiom for the pseudo-ternary operator when it results in +more straightforward code. When nesting expressions, use parentheses to make it +easier to scan visually: + +```lua +local function default_name(name) + -- return the default "Waldo" if name is nil + return name or "Waldo" +end + +local function brew_coffee(machine) + return (machine and machine.is_loaded) and "coffee brewing" or "fill your water" +end +``` + +Note that the `x and y or z` as a substitute for `x ? y : z` does not work if +`y` may be `nil` or `false` so avoid it altogether for returning booleans or +values which may be nil. + +## Blocks + +* Use single-line blocks only for `then return`, `then break` and `function return` (a.k.a "lambda") constructs: + +```lua +-- good +if test then break end + +-- good +if not ok then return nil, "this failed for this reason: " .. reason end + +-- good +use_callback(x, function(k) return k.last end) + +-- good +if test then + return false +end + +-- bad +if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == 10 then do_other_complicated_function() end + +-- good +if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == 10 then + do_other_complicated_function() + return false +end +``` + +* Separate statements onto multiple lines. Do not use semicolons as statement terminators. + +```lua +-- bad +local whatever = "sure"; +a = 1; b = 2 + +-- good +local whatever = "sure" +a = 1 +b = 2 +``` + +## Spacing + +* Use a space after `--`. + +```lua +--bad +-- good +``` + +* Always put a space after commas and between operators and assignment signs: + +```lua +-- bad +local x = y*9 +local numbers={1,2,3} +numbers={1 , 2 , 3} +numbers={1 ,2 ,3} +local strings = { "hello" + , "Lua" + , "world" + } +dog.set( "attr",{ + age="1 year", + breed="Bernese Mountain Dog" +}) + +-- good +local x = y * 9 +local numbers = {1, 2, 3} +local strings = { + "hello"; + "Lua"; + "world"; +} +dog.set("attr", { + age = "1 year", + breed = "Bernese Mountain Dog", +}) +``` + +* Indent tables and functions according to the start of the line, not the construct: + +```lua +-- bad +local my_table = { + "hello", + "world", + } +using_a_callback(x, function(...) + print("hello") + end) + +-- good +local my_table = { + "hello"; + "world"; +} +using_a_callback(x, function(...) + print("hello") +end) +``` + +> **Rationale:** This keep indentation levels aligned at predictable places. You don't +need to realign the entire block if something in the first line changes (such as +replacing `x` with `xy` in the `using_a_callback` example above). + +* The concatenation operator gets a pass for avoiding spaces: + +```lua +-- okay +local message = "Hello, "..user.."! This is your day # "..day.." in our platform!" +``` + +> **Rationale:** Being at the baseline, the dots already provide some visual spacing. + +* No spaces after the name of a function in a declaration or in its arguments: + +```lua +-- bad +local function hello ( name, language ) + -- code +end + +-- good +local function hello(name, language) + -- code +end +``` + +* Add blank lines between functions: + +```lua +-- bad +local function foo() + -- code +end +local function bar() + -- code +end + +-- good +local function foo() + -- code +end + +local function bar() + -- code +end +``` + +* Avoid aligning variable declarations: + +```lua +-- bad +local a = 1 +local long_identifier = 2 + +-- good +local a = 1 +local long_identifier = 2 +``` + +> **Rationale:** This produces extra diffs which add noise to `git blame`. + +* Alignment is occasionally useful when logical correspondence is to be highlighted: + +```lua +-- okay +sys_command(form, UI_FORM_UPDATE_NODE, "a", FORM_NODE_HIDDEN, false) +sys_command(form, UI_FORM_UPDATE_NODE, "sample", FORM_NODE_VISIBLE, false) +``` + +## Typing + +* In non-performance critical code, it can be useful to add type-checking assertions +for function arguments: + +```lua +function manif.load_manifest(repo_url, lua_version) + assert(type(repo_url) == "string") + assert(type(lua_version) == "string" or not lua_version) + + -- ... +end +``` + +* Use the standard functions for type conversion, avoid relying on coercion: + +```lua +-- bad +local total_score = review_score .. "" + +-- good +local total_score = tostring(review_score) +``` + +## Errors + +* Functions that can fail for reasons that are expected (e.g. I/O) should +return `nil` and a (string) error message on error, possibly followed by other +return values such as an error code. + +* On errors such as API misuse, an error should be thrown, either with `error()` +or `assert()`. + +## Modules + +Follow [these guidelines](http://hisham.hm/2014/01/02/how-to-write-lua-modules-in-a-post-module-world/) for writing modules. In short: + +* Always require a module into a local variable named after the last component of the module’s full name. + +```lua +local bar = require("foo.bar") -- requiring the module + +bar.say("hello") -- using the module +``` + +* Don’t rename modules arbitrarily: + +```lua +-- bad +local skt = require("socket") +``` + +> **Rationale:** Code is much harder to read if we have to keep going back to the top +to check how you chose to call a module. + +* Start a module by declaring its table using the same all-lowercase local +name that will be used to require it. You may use an LDoc comment to identify +the whole module path. + +```lua +--- @module foo.bar +local bar = {} +``` + +* Try to use names that won't clash with your local variables. For instance, don't +name your module something like “size”. + +* Use `local function` to declare _local_ functions only: that is, functions +that won’t be accessible from outside the module. + +That is, `local function helper_foo()` means that `helper_foo` is really local. + +* Public functions are declared in the module table, with dot syntax: + +```lua +function bar.say(greeting) + print(greeting) +end +``` + +> **Rationale:** Visibility rules are made explicit through syntax. + +* Do not set any globals in your module and always return a table in the end. + +* If you would like your module to be used as a function, you may set the +`__call` metamethod on the module table instead. + +> **Rationale:** Modules should return tables in order to be amenable to have their +contents inspected via the Lua interactive interpreter or other tools. + +* Requiring a module should cause no side-effect other than loading other +modules and returning the module table. + +* A module should not have state. If a module needs configuration, turn + it into a factory. For example, do not make something like this: + +```lua +-- bad +local mp = require "MessagePack" +mp.set_integer("unsigned") +``` + +and do something like this instead: + +```lua +-- good +local messagepack = require("messagepack") +local mpack = messagepack.new({integer = "unsigned"}) +``` + +* The invocation of require may omit parentheses around the module name: + +```lua +local bla = require "bla" +``` + +## Metatables, classes and objects + +If creating a new type of object that has a metatable and methods, the +metatable and methods table should be separate, and the metatable name +should end with `_mt`. + +```lua +local mytype_methods = {}; +local mytype_mt = { __index = mytype_methods }; + +function mytype_methods:add_new_thing(thing) +end + +local function new() + return setmetatable({}, mytype_mt); +end + +return { new = new }; +``` + +* Use the method notation when invoking methods: + +``` +-- bad +my_object.my_method(my_object) + +-- good +my_object:my_method() +``` + +> **Rationale:** This makes it explicit that the intent is to use the function as a method. + +* Do not rely on the `__gc` metamethod to release resources other than memory. +If your object manage resources such as files, add a `close` method to their +APIs and do not auto-close via `__gc`. Auto-closing via `__gc` would entice +users of your module to not close resources as soon as possible. (Note that +the standard `io` library does not follow this recommendation, and users often +forget that not closing files immediately can lead to "too many open files" +errors when the program runs for a while.) + +> **Rationale:** The garbage collector performs automatic *memory* management, +dealing with memory only. There is no guarantees as to when the garbage +collector will be invoked, and memory pressure does not correlate to pressure +on other resources. + +## File structure + +* Lua files should be named in all lowercase. + +* Tests should be in a top-level `spec` directory. Prosody uses +[Busted](http://olivinelabs.com/busted/) for testing. + +## Static checking + +All code should pass [luacheck](https://github.com/mpeterv/luacheck) using +the `.luacheckrc` provided in the Prosody repository, and using miminal +inline exceptions. + +* luacheck warnings of class 211, 212, 213 (unused variable, argument or loop +variable) may be ignored, if the unused variable was added explicitly: for +example, sometimes it is useful, for code understandability, to spell out what +the keys and values in a table are, even if you're only using one of them. +Another example is a function that needs to follow a given signature for API +reasons (e.g. a callback that follows a given format) but doesn't use some of +its arguments; it's better to spell out in the argument what the API the +function implements is, instead of adding `_` variables. + +``` +local foo, bar = some_function() --luacheck: ignore 212/foo +print(bar) +``` + +* luacheck warning 542 (empty if branch) can also be ignored, when a sequence +of `if`/`elseif`/`else` blocks implements a "switch/case"-style list of cases, +and one of the cases is meant to mean "pass". For example: + +```lua +if warning >= 600 and warning <= 699 then + print("no whitespace warnings") +elseif warning == 542 then --luacheck: ignore 542 + -- pass +else + print("got a warning: "..warning) +end +``` + +> **Rationale:** This avoids writing negated conditions in the final fallback +case, and it's easy to add another case to the construct without having to +edit the fallback. + -- cgit v1.2.3 From 8c6de8ceba4bffa55a022b141d6ce70aae0d6d65 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 14 Mar 2019 16:18:00 +0000 Subject: Actually remove coding_style.txt --- doc/coding_style.txt | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 doc/coding_style.txt (limited to 'doc') diff --git a/doc/coding_style.txt b/doc/coding_style.txt deleted file mode 100644 index af44da1a..00000000 --- a/doc/coding_style.txt +++ /dev/null @@ -1,33 +0,0 @@ -This file describes some coding styles to try and adhere to when contributing to this project. -Please try to follow, and feel free to fix code you see not following this standard. - -== Indentation == - - 1 tab indentation for all blocks - -== Spacing == - -No space between function names and parenthesis and parenthesis and parameters: - - function foo(bar, baz) - -Single space between braces and key/value pairs in table constructors: - - { foo = "bar", bar = "foo" } - -== Local variable naming == - -In this project there are many places where use of globals is restricted, and locals used for faster access. - -Local versions of standard functions should follow the below form: - - math.random -> m_random - string.char -> s_char - -== Miscellaneous == - -Single-statement blocks may be written on one line when short - - if foo then bar(); end - -'do' and 'then' keywords should be placed at the end of the line, and never on a line by themself. -- cgit v1.2.3 From 24581c47db0db9739d89339034c4d4e58bcdf8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 23 Mar 2019 02:27:45 +0000 Subject: doc/coding_style: remove superfulous bracket in example --- doc/coding_style.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/coding_style.md b/doc/coding_style.md index 6f34d371..af1a2502 100644 --- a/doc/coding_style.md +++ b/doc/coding_style.md @@ -131,7 +131,6 @@ constants from C. ```lua local player = { name = "Jack", class = "Rogue" } -} ``` * Items should be separated by commas. If there are many items, put each -- cgit v1.2.3 From 7aab0c40a49c5f6a2008646f636b19290d2abfe4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 23 Mar 2019 03:56:55 +0100 Subject: doc/coding_style: Trim trailing whitespace --- doc/coding_style.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/coding_style.md b/doc/coding_style.md index af1a2502..17b7c037 100644 --- a/doc/coding_style.md +++ b/doc/coding_style.md @@ -330,7 +330,7 @@ than if it says `check_version = function()` under some indentation level. ## Variable declaration -* Always use `local` to declare variables. +* Always use `local` to declare variables. ```lua -- bad @@ -446,8 +446,8 @@ if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == -- good if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == 10 then - do_other_complicated_function() - return false + do_other_complicated_function() + return false end ``` @@ -466,7 +466,7 @@ b = 2 ## Spacing -* Use a space after `--`. +* Use a space after `--`. ```lua --bad -- cgit v1.2.3 From 95314bb2be435c6b7527675d08c53ea8809b0690 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 23 Mar 2019 04:00:55 +0100 Subject: doc/coding_style: The codebase uses semicolons --- doc/coding_style.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/coding_style.md b/doc/coding_style.md index 17b7c037..6ca527fa 100644 --- a/doc/coding_style.md +++ b/doc/coding_style.md @@ -451,17 +451,17 @@ if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == end ``` -* Separate statements onto multiple lines. Do not use semicolons as statement terminators. +* Separate statements onto multiple lines. Use semicolons as statement terminators. ```lua -- bad -local whatever = "sure"; -a = 1; b = 2 +local whatever = "sure" +a = 1 b = 2 -- good -local whatever = "sure" -a = 1 -b = 2 +local whatever = "sure"; +a = 1; +b = 2; ``` ## Spacing -- cgit v1.2.3 From 582fa3f46f105fe55447d607dceb43b5ac61d440 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 25 Feb 2019 15:48:28 +0100 Subject: mod_storage_internal: Implement a summary API returning message counts per contact --- doc/storage.tld | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/storage.tld b/doc/storage.tld index f1d33e58..057649a4 100644 --- a/doc/storage.tld +++ b/doc/storage.tld @@ -47,6 +47,9 @@ interface archive_store -- Array of dates which do have messages (Optional?) dates : ( self, string? ) -> ({ string }) | (nil, string) + + -- Map of counts per "with" field + summary : ( self, string?, archive_query? ) -> ( { string : integer } ) | (nil, string) end -- This represents moduleapi -- cgit v1.2.3 From 643032e8b38abbb96d52c763cd5e3093d9b895ce Mon Sep 17 00:00:00 2001 From: marc0s Date: Sat, 30 Mar 2019 18:44:34 +0100 Subject: doc/coding_style: apply consistent semi-colon usage Make all "good" statements in the coding style document use consistent statement-separator semi-colon --- doc/coding_style.md | 122 ++++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to 'doc') diff --git a/doc/coding_style.md b/doc/coding_style.md index 6ca527fa..f9a10ece 100644 --- a/doc/coding_style.md +++ b/doc/coding_style.md @@ -13,7 +13,7 @@ This style guides lists the coding conventions used in the for i, pkg in ipairs(packages) do for name, version in pairs(pkg) do if name == searched then - print(version) + print(version); end end end @@ -69,7 +69,7 @@ unless you are writing a function that operates on generic tables. ```lua for _, item in ipairs(items) do - do_something_with_item(item) + do_something_with_item(item); end ``` @@ -85,7 +85,7 @@ local c = function() end -- good -local this_is_my_object = {} +local this_is_my_object = {}; local function do_that_thing() -- ...stuff... @@ -113,7 +113,7 @@ end -- good local function is_evil(alignment) - return alignment < 100 + return alignment < 100; end ``` @@ -130,7 +130,7 @@ constants from C. * When creating a table, prefer populating its fields all at once, if possible: ```lua -local player = { name = "Jack", class = "Rogue" } +local player = { name = "Jack", class = "Rogue" }; ``` * Items should be separated by commas. If there are many items, put each @@ -145,7 +145,7 @@ local player = { ``` > **Rationale:** This makes the structure of your tables more evident at a glance. -Trailing commas make it quicker to add new fields and produces shorter diffs. +Trailing semi-colons make it quicker to add new fields and produces shorter diffs. * Use plain `key` syntax whenever possible, use `["key"]` syntax when using names that can't be represented as identifiers and avoid mixing representations in @@ -153,9 +153,9 @@ a declaration: ```lua local mytable = { - ["1394-E"] = val1, - ["UTF-8"] = val2, - ["and"] = val2, + ["1394-E"] = val1; + ["UTF-8"] = val2; + ["and"] = val2; } ``` @@ -165,8 +165,8 @@ local mytable = { that contain double quotes. ```lua -local name = "Prosody" -local sentence = 'The name of the program is "Prosody"' +local name = "Prosody"; +local sentence = 'The name of the program is "Prosody"'; ``` > **Rationale:** Double quotes are used as string delimiters in a larger number of @@ -218,12 +218,12 @@ end -- good local function is_good_name(name, options, args) if #name < 3 or #name > 30 then - return false + return false; end -- ...stuff... - return true + return true; end ``` @@ -236,8 +236,8 @@ end -- bad local data = get_data"KRP"..tostring(area_number) -- good -local data = get_data("KRP"..tostring(area_number)) -local data = get_data("KRP")..tostring(area_number) +local data = get_data("KRP"..tostring(area_number)); +local data = get_data("KRP")..tostring(area_number); ``` > **Rationale:** It is not obvious at a glace what the precedence rules are @@ -251,8 +251,8 @@ lines. ```lua local an_instance = a_module.new { - a_parameter = 42, - another_parameter = "yay", + a_parameter = 42; + another_parameter = "yay"; } ``` @@ -265,15 +265,15 @@ so there are no precedence issues. ```lua local luke = { - jedi = true, - age = 28, + jedi = true; + age = 28; } -- bad local is_jedi = luke["jedi"] -- good -local is_jedi = luke.jedi +local is_jedi = luke.jedi; ``` * Use subscript notation `[]` when accessing properties with a variable or if using a table as a list. @@ -282,11 +282,11 @@ local is_jedi = luke.jedi local vehicles = load_vehicles_from_disk("vehicles.dat") if vehicles["Porsche"] then - porsche_handler(vehicles["Porsche"]) - vehicles["Porsche"] = nil + porsche_handler(vehicles["Porsche"]); + vehicles["Porsche"] = nil; end for name, cars in pairs(vehicles) do - regular_handler(cars) + regular_handler(cars); end ``` @@ -298,7 +298,7 @@ to be used as a record/object field. * When declaring modules and classes, declare functions external to the table definition: ```lua -local my_module = {} +local my_module = {}; function my_module.a_function(x) -- code @@ -337,7 +337,7 @@ than if it says `check_version = function()` under some indentation level. superpower = get_superpower() -- good -local superpower = get_superpower() +local superpower = get_superpower(); ``` > **Rationale:** Not doing so will result in global variables to avoid polluting @@ -366,18 +366,18 @@ end -- good local bad = function() - test() - print("doing stuff..") + test(); + print("doing stuff.."); --...other stuff... - local name = get_name() + local name = get_name(); if name == "test" then - return false + return false; end - return name + return name; end ``` @@ -410,11 +410,11 @@ easier to scan visually: ```lua local function default_name(name) -- return the default "Waldo" if name is nil - return name or "Waldo" + return name or "Waldo"; end local function brew_coffee(machine) - return (machine and machine.is_loaded) and "coffee brewing" or "fill your water" + return (machine and machine.is_loaded) and "coffee brewing" or "fill your water"; end ``` @@ -434,7 +434,7 @@ if test then break end if not ok then return nil, "this failed for this reason: " .. reason end -- good -use_callback(x, function(k) return k.last end) +use_callback(x, function(k) return k.last end); -- good if test then @@ -446,8 +446,8 @@ if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == -- good if test < 1 and do_complicated_function(test) == false or seven == 8 and nine == 10 then - do_other_complicated_function() - return false + do_other_complicated_function(); + return false; end ``` @@ -491,17 +491,17 @@ dog.set( "attr",{ }) -- good -local x = y * 9 -local numbers = {1, 2, 3} +local x = y * 9; +local numbers = {1, 2, 3}; local strings = { "hello"; "Lua"; "world"; } dog.set("attr", { - age = "1 year", - breed = "Bernese Mountain Dog", -}) + age = "1 year"; + breed = "Bernese Mountain Dog"; +}); ``` * Indent tables and functions according to the start of the line, not the construct: @@ -522,7 +522,7 @@ local my_table = { "world"; } using_a_callback(x, function(...) - print("hello") + print("hello"); end) ``` @@ -534,7 +534,7 @@ replacing `x` with `xy` in the `using_a_callback` example above). ```lua -- okay -local message = "Hello, "..user.."! This is your day # "..day.." in our platform!" +local message = "Hello, "..user.."! This is your day # "..day.." in our platform!"; ``` > **Rationale:** Being at the baseline, the dots already provide some visual spacing. @@ -582,8 +582,8 @@ local a = 1 local long_identifier = 2 -- good -local a = 1 -local long_identifier = 2 +local a = 1; +local long_identifier = 2; ``` > **Rationale:** This produces extra diffs which add noise to `git blame`. @@ -592,8 +592,8 @@ local long_identifier = 2 ```lua -- okay -sys_command(form, UI_FORM_UPDATE_NODE, "a", FORM_NODE_HIDDEN, false) -sys_command(form, UI_FORM_UPDATE_NODE, "sample", FORM_NODE_VISIBLE, false) +sys_command(form, UI_FORM_UPDATE_NODE, "a", FORM_NODE_HIDDEN, false); +sys_command(form, UI_FORM_UPDATE_NODE, "sample", FORM_NODE_VISIBLE, false); ``` ## Typing @@ -603,8 +603,8 @@ for function arguments: ```lua function manif.load_manifest(repo_url, lua_version) - assert(type(repo_url) == "string") - assert(type(lua_version) == "string" or not lua_version) + assert(type(repo_url) == "string"); + assert(type(lua_version) == "string" or not lua_version); -- ... end @@ -617,7 +617,7 @@ end local total_score = review_score .. "" -- good -local total_score = tostring(review_score) +local total_score = tostring(review_score); ``` ## Errors @@ -636,9 +636,9 @@ Follow [these guidelines](http://hisham.hm/2014/01/02/how-to-write-lua-modules-i * Always require a module into a local variable named after the last component of the module’s full name. ```lua -local bar = require("foo.bar") -- requiring the module +local bar = require("foo.bar"); -- requiring the module -bar.say("hello") -- using the module +bar.say("hello"); -- using the module ``` * Don’t rename modules arbitrarily: @@ -657,7 +657,7 @@ the whole module path. ```lua --- @module foo.bar -local bar = {} +local bar = {}; ``` * Try to use names that won't clash with your local variables. For instance, don't @@ -672,7 +672,7 @@ That is, `local function helper_foo()` means that `helper_foo` is really local. ```lua function bar.say(greeting) - print(greeting) + print(greeting); end ``` @@ -702,14 +702,14 @@ and do something like this instead: ```lua -- good -local messagepack = require("messagepack") -local mpack = messagepack.new({integer = "unsigned"}) +local messagepack = require("messagepack"); +local mpack = messagepack.new({integer = "unsigned"}); ``` * The invocation of require may omit parentheses around the module name: ```lua -local bla = require "bla" +local bla = require "bla"; ``` ## Metatables, classes and objects @@ -739,7 +739,7 @@ return { new = new }; my_object.my_method(my_object) -- good -my_object:my_method() +my_object:my_method(); ``` > **Rationale:** This makes it explicit that the intent is to use the function as a method. @@ -780,8 +780,8 @@ its arguments; it's better to spell out in the argument what the API the function implements is, instead of adding `_` variables. ``` -local foo, bar = some_function() --luacheck: ignore 212/foo -print(bar) +local foo, bar = some_function(); --luacheck: ignore 212/foo +print(bar); ``` * luacheck warning 542 (empty if branch) can also be ignored, when a sequence @@ -790,11 +790,11 @@ and one of the cases is meant to mean "pass". For example: ```lua if warning >= 600 and warning <= 699 then - print("no whitespace warnings") + print("no whitespace warnings"); elseif warning == 542 then --luacheck: ignore 542 -- pass else - print("got a warning: "..warning) + print("got a warning: "..warning); end ``` -- cgit v1.2.3 From 8a4bec10cab93f6ef4b99cdc7b7f2c1d36f43688 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 27 Aug 2019 20:53:11 +0200 Subject: doap: Add a Description Of A Project file --- doc/doap.xml | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 doc/doap.xml (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml new file mode 100644 index 00000000..47b4ca14 --- /dev/null +++ b/doc/doap.xml @@ -0,0 +1,427 @@ + + + + Prosody IM + Lightweight XMPP server + + 2008-08-22 + + + + + + + + + + + + + + + Lua + C + Linux + macOS + FreeBSD + OpenBSD + NetBSD + + + Matthew Wild + MattJ + https://matthewwild.co.uk/ + + + + + Waqas Hussain + waqas + + + + + Kim Alvefur + Zash + https://www.zash.se/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7 + 0.10 + + + + + + + + + + + 0.3 + + + + + + 0.1 + + + + + + 0.8 + + + + + + 0.1 + + + + + + 0.9 + + + + + + 0.7 + + + + + + + + + + + 0.1 + + + + + + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + 0.4 + + + + + + + + + + + via XEP-0163 + + + + + + 0.2 + + + + + + 0.10 + + + + + + 0.9 + + + + + + 0.7 + + + + + + 0.6 + 0.10 + + + + + + via XEP-0398 + + + + + + 0.10 + + + + + + + + + + + 0.5 + + + + + + + + + + + via XEP-0163 + + + + + + + + + + + 0.9 + + + + + + + + + + + + + + + + via XEP-0163 + + + + + + 0.10 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + 0.1 + + + + + + 0.1 + + + + + + + + + + + 0.2 + + + + + + required level + + + + + + 0.1 + + + + + + 0.7 + + + + + + 0.4 + + + + + + 0.10 + + + + + + 0.11 + + + + + + Core Server + + + + + + 0.10 + + + + + + 0.9 + refers to inclusion of delay stamp in presence + + + + + + 0.11 + + + + + + via XEP-0163 + + + + + + 0.11 + + + + + + 0.11 + + + + + + -- cgit v1.2.3 From f11e620eb73c131401eb77f6750a2f5e21c95c44 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 9 Sep 2019 19:54:59 +0200 Subject: doap: Add XEP-0288 --- doc/doap.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 47b4ca14..ce6cca4c 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -372,6 +372,12 @@ 0.10 + + + + 0.12 + + -- cgit v1.2.3 From f9017df5432ff31ec0b21a406104c5654d5a23ad Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Sep 2019 16:13:55 +0200 Subject: doap: Update to newer format --- doc/doap.xml | 754 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 375 insertions(+), 379 deletions(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index ce6cca4c..4eeafcc3 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -1,5 +1,5 @@ - + Prosody IM Lightweight XMPP server @@ -51,383 +51,379 @@ - - - - - - - - - - - - - - - - - - - - - 0.7 - 0.10 - - - - - - - - - - - 0.3 - - - - - - 0.1 - - - - - - 0.8 - - - - - - 0.1 - - - - - - 0.9 - - - - - - 0.7 - - - - - - - - - - - 0.1 - - - - - - 0.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - via XEP-0163 - - - - - - via XEP-0163 - - - - - - 0.4 - - - - - - - - - - - via XEP-0163 - - - - - - 0.2 - - - - - - 0.10 - - - - - - 0.9 - - - - - - 0.7 - - - - - - 0.6 - 0.10 - - - - - - via XEP-0398 - - - - - - 0.10 - - - - - - - - - - - 0.5 - - - - - - - - - - - via XEP-0163 - - - - - - - - - - - 0.9 - - - - - - - - - - - - - - - - via XEP-0163 - - - - - - 0.10 - - - - - - via XEP-0163 - - - - - - via XEP-0163 - - - - - - via XEP-0163 - - - - - - via XEP-0163 - - - - - - 0.1 - - - - - - 0.1 - - - - - - - - - - - 0.2 - - - - - - required level - - - - - - 0.1 - - - - - - 0.7 - - - - - - 0.4 - - - - - - 0.10 - - - - - - 0.12 - - - - - - 0.11 - - - - - - Core Server - - - - - - 0.10 - - - - - - 0.9 - refers to inclusion of delay stamp in presence - - - - - - 0.11 - - - - - - via XEP-0163 - - - - - - 0.11 - - - - - - 0.11 - - - - + + + + + + + + + + + + + + + + + + + 0.7 + 0.10 + + + + + + + + + + + 0.3 + + + + + + 0.1 + + + + + + 0.8 + + + + + + 0.1 + + + + + + 0.9 + + + + + + 0.7 + + + + + + + + + + + 0.1 + + + + + + 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + 0.4 + + + + + + + + + + + via XEP-0163 + + + + + + 0.2 + + + + + + 0.10 + + + + + + 0.9 + + + + + + 0.7 + + + + + + 0.6 + 0.10 + + + + + + via XEP-0398 + + + + + + 0.10 + + + + + + + + + + + 0.5 + + + + + + + + + + + via XEP-0163 + + + + + + + + + + + 0.9 + + + + + + + + + + + + + + + + via XEP-0163 + + + + + + 0.10 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + via XEP-0163 + + + + + + 0.1 + + + + + + 0.1 + + + + + + + + + + + 0.2 + + + + + + required level + + + + + + 0.1 + + + + + + 0.7 + + + + + + 0.4 + + + + + + 0.10 + + + + + + 0.12 + + + + + + 0.11 + + + + + + Core Server + + + + + + 0.10 + + + + + + 0.9 + refers to inclusion of delay stamp in presence + + + + + + 0.11 + + + + + + via XEP-0163 + + + + + + 0.11 + + + + + + 0.11 + + -- cgit v1.2.3 From bd2dcf7503ec9f262636eb5e98e33fdf71d2a700 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Sep 2019 21:41:04 +0200 Subject: doap: Fix namespace of --- doc/doap.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 4eeafcc3..2bc11fd3 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -70,7 +70,7 @@ 0.7 - 0.10 + 0.10 @@ -204,7 +204,7 @@ - 0.10 + 0.10 @@ -223,7 +223,7 @@ 0.6 - 0.10 + 0.10 -- cgit v1.2.3 From 9327a1edc037edc07542c56d221cace8bd8cbdf2 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Sep 2019 22:14:56 +0200 Subject: doap: Add details to XEPs numbered under 100 --- doc/doap.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 2bc11fd3..5dc61ed0 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -54,16 +54,23 @@ + complete + 2.9 + 0.4 + 0.7 + 0.1 + mod_lastactivity and mod_uptime + complete @@ -76,18 +83,24 @@ + 0.10. + complete + 1.32.0( 0.3 + partial + 1.2 0.1 + complete @@ -100,17 +113,21 @@ 0.1 + complete + 1.15.8 0.9 + partial + 1.8.1 0.7 @@ -123,11 +140,14 @@ 0.1 + 2.4 + complete + 2.5 0.1 @@ -139,6 +159,8 @@ + 1.1 + 0.1 @@ -159,6 +181,8 @@ + 1.1 + 0.1 -- cgit v1.2.3 From ee98d07a437843f597d79ca3333700c5cc4bd4bc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Sep 2019 22:25:04 +0200 Subject: doap: Add details about most recent XEPs numbered over 300 --- doc/doap.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 5dc61ed0..57d2246b 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -415,12 +415,15 @@ + 0.6.3 0.10 + mod_mam, mod_muc_mam + 0.2 0.9 refers to inclusion of delay stamp in presence @@ -428,25 +431,32 @@ + 0.3.0 0.11 - via XEP-0163 + via XEP-0163, XEP-0222 + 0.2.1 0.11 + complete + mod_vcard_legacy + 1.0.1 0.11 + complete + Server Optimization -- cgit v1.2.3 From d248f67c60fed92db726da4f2bc5b4d4a3895c7c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 19 Sep 2019 22:53:00 +0200 Subject: doap: Remove stray '(' --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 57d2246b..af9b2fab 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -90,7 +90,7 @@ - 1.32.0( + 1.32.0 0.3 partial -- cgit v1.2.3 From d2cb312666fa8151900c34d44e91e27d61d2ec2f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 28 Sep 2019 00:09:24 +0200 Subject: doap: Add some XEP versions --- doc/doap.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index af9b2fab..9ad71cb6 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -205,6 +205,7 @@ + 1.6 0.4 @@ -314,6 +315,7 @@ + 1.3 0.10 @@ -344,23 +346,27 @@ + 2.0.1 0.1 + 2.0 0.1 + 2.0 + 1.2 0.2 -- cgit v1.2.3 From 067ae06b1a476c0f35edcea59a1ab258dc655f88 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 28 Sep 2019 00:09:29 +0200 Subject: doap: Add some supported-since versions --- doc/doap.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 9ad71cb6..a52fd68a 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -188,6 +188,7 @@ + 0.9 @@ -212,6 +213,7 @@ + 0.8 @@ -304,6 +306,7 @@ + 0.9.10 -- cgit v1.2.3 From e8eae31799c80382afb90ff4c0e888078bfd5494 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 6 Oct 2019 16:34:42 +0200 Subject: doap: Add reference to draft-cridland-xmpp-session This covers the optional element added in 0bbbc9042361 --- doc/doap.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index a52fd68a..81322722 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -51,6 +51,8 @@ + + -- cgit v1.2.3 From d3a7d673d63cc78564ee231f58751c4ad11c0c1a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 9 Oct 2019 23:19:42 +0200 Subject: doap: Fix element name typo (node -> note) --- doc/doap.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 81322722..5f20efaf 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -196,13 +196,13 @@ - via XEP-0163 + via XEP-0163 - via XEP-0163 + via XEP-0163 @@ -221,7 +221,7 @@ - via XEP-0163 + via XEP-0163 -- cgit v1.2.3 From ab2711ede517c303256e4919203f1c7b2b9b6b87 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 9 Oct 2019 23:20:22 +0200 Subject: doap: Mention support for XEP-0122: Data Forms Validation Added to util.dataforms in a4c52e304e6f. Used in PubSub (cc32aae5c7da) and MUC (13ccc2f05007). --- doc/doap.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 5f20efaf..76f9cae1 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -236,6 +236,14 @@ 0.10 + + + + 1.0.2 + 0.11 + partial + + -- cgit v1.2.3 From d9639ab531002b59206e1cc00f8e1f58c5a6c2ae Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 10 Oct 2019 23:39:32 +0200 Subject: doap: Fix missing '0' in URL to XEP-0288 --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 76f9cae1..8bc1c4fb 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -415,7 +415,7 @@ - + 0.12 -- cgit v1.2.3 From f9807ebbf057058cb6ef18966dc4800d874bb32a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 10 Oct 2019 23:41:59 +0200 Subject: doap: Note about where XEP-0227 is used --- doc/doap.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 8bc1c4fb..0e8c4c11 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -399,6 +399,7 @@ 0.7 + Used in migrator tools -- cgit v1.2.3 From a16efe359c2f3ee0d565cc85cb344771135fbc88 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Oct 2019 00:27:53 +0200 Subject: doap: Referece SCRAM Added in 0.7.0, first commit 41d42d253a1d --- doc/doap.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 0e8c4c11..8407888e 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -46,6 +46,7 @@ https://www.zash.se/ + -- cgit v1.2.3 From eb9557dc286e0e2fbfeafda19b982f3da7faeef8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Oct 2019 00:29:05 +0200 Subject: doap: Note about XEP-0237: Roster Versioning being merged into rfc6121 --- doc/doap.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 8407888e..e916ab6a 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -407,6 +407,7 @@ 0.4 + implied by rfc6121 -- cgit v1.2.3 From 116ded720bcd9614b34be1eb3b4b794bb3a5c50b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Oct 2019 00:29:53 +0200 Subject: doap: Add detials for XEP-0280, 0288 and 0292 --- doc/doap.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index e916ab6a..787de9b4 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -413,19 +413,26 @@ + 0.12.1 + complete 0.10 + 1.0.1 + complete 0.12 + 0.10 + complete 0.11 + mod_vcard4, mod_vcard_legacy -- cgit v1.2.3 From 1ef09f8698c54bc48aa67bd54bb7c12cf6a63803 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Oct 2019 00:52:29 +0200 Subject: doap: Even more XEP details --- doc/doap.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 787de9b4..e1474c14 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -260,6 +260,7 @@ + 2.0 0.6 0.10 @@ -267,29 +268,36 @@ + 1.1 + 0.11 via XEP-0398 + 1.0.1 0.10 + 1.0.1 + 0.1 + 1.2.1 0.5 + 1.0 @@ -301,11 +309,14 @@ + 1.2 + 0.4 + 1.1 0.9 @@ -317,6 +328,8 @@ + 1.0 + complete 0.9.10 @@ -330,6 +343,7 @@ 1.3 + complete 0.10 -- cgit v1.2.3 From 6fd6ad9958fb23a8956a21810113c5da99a40b6a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Oct 2019 00:58:33 +0200 Subject: doap: Add XEP-0380 since mod_csi_simple takes that into consideration --- doc/doap.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index e1474c14..42e98f77 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -478,6 +478,14 @@ 0.11 + + + + 0.3.0 + 0.11 + Used in context of XEP-0352 + + -- cgit v1.2.3 From 76c7cb9560f56dd3a24b26ff72182cd34a2a350c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 15 Oct 2019 00:13:52 +0200 Subject: doc/doap: Claim support for XEP-0268 via mod_csi_simple mod_csi_simple tries to follow the advice in XEP-0268. Notably, since 7d78b24d8449 it also does this: > If the server receives data, the phones radio is already on, therefore > you should flush any pending data as soon as possible after receiving > data from a client --- doc/doap.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 42e98f77..3d8de106 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -424,6 +424,13 @@ implied by rfc6121 + + + + 0.11 + mod_csi_simple + + -- cgit v1.2.3 From 945ec3c73e6dfc66767e7283af345f5d0eaa2b8b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 15 Oct 2019 00:21:01 +0200 Subject: doc/doap: Claim support for XEP-0368 by way of legacy_ssl_ports > Server support of XEP-0368 means having the ability to accept direct TLS connections. This is what legacy_ssl_ports does. First trace of it seems to be 8458be0941e7 --- doc/doap.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 3d8de106..ed6fc7bb 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -485,6 +485,15 @@ 0.11 + + + + 1.1.0 + partial + 0.2 + legacy_ssl_ports + + -- cgit v1.2.3 From 8cfba1f03ef4376d52e2d7edfac240a78c07c758 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 20 Oct 2019 16:47:20 +0200 Subject: doap: Copy longer description from README --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index ed6fc7bb..80393805 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -3,7 +3,7 @@ Prosody IM Lightweight XMPP server - + Prosody is a server for Jabber/XMPP written in Lua. It aims to be easy to use and light on resources. For developers, it aims to give a flexible system on which to rapidly develop added functionality or rapidly prototype new protocols. 2008-08-22 -- cgit v1.2.3 From 68b32f4c91d4c291699248549004d7f77957566d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 20 Oct 2019 16:57:28 +0200 Subject: doap: Trim a trailing '.' from a version/branch name for consistency --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 80393805..c94b0e5f 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -86,7 +86,7 @@ - 0.10. + 0.10 complete -- cgit v1.2.3 From 04cb4aa218ec524bd0852e87ca72f8cd7f1d9033 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 20 Oct 2019 18:46:46 +0200 Subject: doap: mod_csi_simple tries to follow XEP-0286: Mobile Considerations, not XEP-0268 --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index c94b0e5f..bfad0b62 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -426,7 +426,7 @@ - + 0.11 mod_csi_simple -- cgit v1.2.3 From 4caf87fa9d93fb224dbc5492a5f20adb845d27c5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 20 Oct 2019 18:48:10 +0200 Subject: doap: Sort by XEP number --- doc/doap.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index bfad0b62..d97d39d7 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -424,13 +424,6 @@ implied by rfc6121 - - - - 0.11 - mod_csi_simple - - @@ -439,6 +432,13 @@ 0.10 + + + + 0.11 + mod_csi_simple + + -- cgit v1.2.3 From 3cbece6dc346c22f5cd9f07a0921a84daec0cdee Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 3 Nov 2019 17:43:14 +0100 Subject: doap: Reorder tags for consistency It's nice when `grep version.1 -B1` shows XEPs with 1.x versions --- doc/doap.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index d97d39d7..935b5eb4 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -57,8 +57,8 @@ - complete 2.9 + complete -- cgit v1.2.3 From ac663e1b7846213022f9d142174edbf7b3167d09 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 3 Nov 2019 17:44:14 +0100 Subject: doap: Add version of XEP-0012 --- doc/doap.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 935b5eb4..d1d4ad8b 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -71,6 +71,7 @@ + 2.0 0.1 mod_lastactivity and mod_uptime complete -- cgit v1.2.3 From 5af4eb8be2082c6b22f66037bb54d539f78ba942 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 15 Nov 2019 16:49:31 +0100 Subject: doap: Sort XEPs by number --- doc/doap.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index d1d4ad8b..673e0c23 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -228,22 +228,22 @@ - - 0.2 + + 1.0.2 + 0.11 + partial - - 0.10 + + 0.2 - - 1.0.2 - 0.11 - partial + + 0.10 -- cgit v1.2.3 From 0fdb85997abd2be59252595b1fec9e46389da586 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 29 Nov 2019 23:27:51 +0100 Subject: mod_net_multiplex: Add support for using ALPN Potentially a bit more efficient since it can jump to the selected protocol on connect instead of waiting for some data to look at. Adds a 'protocol' field to net providers for this purpose. --- doc/doap.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 673e0c23..1633e2f3 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -51,6 +51,7 @@ + -- cgit v1.2.3 From 62971ce69b890efea8e9d5469fd45a6d1eec236e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 16 Dec 2019 01:52:56 +0100 Subject: doap: More PEP payloads --- doc/doap.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/doap.xml b/doc/doap.xml index 1633e2f3..20686e03 100644 --- a/doc/doap.xml +++ b/doc/doap.xml @@ -159,6 +159,7 @@ + via XEP-0163 @@ -171,6 +172,7 @@ + via XEP-0163 -- cgit v1.2.3