aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-09-26 18:07:33 +0200
committerKim Alvefur <zash@zash.se>2020-09-26 18:07:33 +0200
commit40800ea93bb1dca78c3548de58a09f424f5eef30 (patch)
tree6e7cf6570164fd9e7cd65403868c97911c932176 /spec
parent10f82d332163c8a3572ee507e32611d56e930ca4 (diff)
downloadprosody-40800ea93bb1dca78c3548de58a09f424f5eef30.tar.gz
prosody-40800ea93bb1dca78c3548de58a09f424f5eef30.zip
util.stanza: Get 'by' from context instead
Zash> <error by=?> should go where? extra.by? context? source? Zash> In Prosody this would usually be module.host or a bare user/room JID MattJ> Zash: context MattJ> context.by, basically the opposite of context.actor
Diffstat (limited to 'spec')
-rw-r--r--spec/util_stanza_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/util_stanza_spec.lua b/spec/util_stanza_spec.lua
index c4c1d174..cc32bba9 100644
--- a/spec/util_stanza_spec.lua
+++ b/spec/util_stanza_spec.lua
@@ -234,7 +234,7 @@ describe("util.stanza", function()
it("should accept util.error objects", function ()
local s = st.message({ to = "touser", from = "fromuser", id = "123", type = "chat" }, "Hello");
- local e = errors.new({ type = "modify", condition = "not-acceptable", text = "Bork bork bork", extra = { by = "this.test" } });
+ local e = errors.new({ type = "modify", condition = "not-acceptable", text = "Bork bork bork" }, { by = "this.test" });
local r = st.error_reply(s, e);
assert.are.equal(r.name, s.name);