hi!

On 05/12/2014 01:37 AM, Martin Vietz wrote:

Otr encrypted messages can't be readable for other clients, because of
the Diffie-Hellman key exchange so it is useless to send the messages to
other clients.

its better to mark them as private, find attached a module zash sent me in a chat session.

gre3tings, Klaus

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.
-- Copyright (C) 2014 Zash (Kim Alvefur)

local function tag_otr_as_private(event)
	local stanza = event.stanza;
	local body = stanza:get_child_text("body");
	if body and body:find("?OTR") == 1 then
		stanza:tag("no-copy", {xmlns="urn:xmpp:hints"}):up();
	end
end


module:hook("pre-message/host", tag_otr_as_private, 2);
module:hook("pre-message/bare", tag_otr_as_private, 2);
module:hook("pre-message/full", tag_otr_as_private, 2);

Reply via email to