#2012 mod_invites: "attempt to index local 'opts'" when shell commands called without flags
Reporter
mopp
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Type-Defect
Priority-Medium
Status-New
mopp
on
What steps will reproduce the problem?
1. Open shell with `prosodyctl shell`
2. Run invite:create_contact("user@example.com") or invite:create_account("example.com") without passing an options table, just like it says in `help invite`
What is the expected output?
An invite URI
What do you see instead?
Lua runtime errors:
```
mod_invites.lua:348: attempt to index local 'opts' (a nil value)
mod_invites.lua:288: attempt to index local 'opts' (a nil value)
```
What version of the product are you using? On what operating system?
Prosody trunk nightly build 2086 (2026-09-24, af62c37e1a70), Debian
Please provide any additional information below.
I think the shell handlers for create_contact and create_account access opts.reusable directly without checking if opts is nil when invoked without flags from the shell.
Running invite:create_contact("name@example.com", {reusable=false}) works.
What steps will reproduce the problem? 1. Open shell with `prosodyctl shell` 2. Run invite:create_contact("user@example.com") or invite:create_account("example.com") without passing an options table, just like it says in `help invite` What is the expected output? An invite URI What do you see instead? Lua runtime errors: ``` mod_invites.lua:348: attempt to index local 'opts' (a nil value) mod_invites.lua:288: attempt to index local 'opts' (a nil value) ``` What version of the product are you using? On what operating system? Prosody trunk nightly build 2086 (2026-09-24, af62c37e1a70), Debian Please provide any additional information below. I think the shell handlers for create_contact and create_account access opts.reusable directly without checking if opts is nil when invoked without flags from the shell. Running invite:create_contact("name@example.com", {reusable=false}) works.