Configuring features is not possible since 721ca125
This commit is contained in:
parent
90d9ef3a5d
commit
6adfc2cec5
|
@ -147,7 +147,8 @@ Usage
|
||||||
The web-presence feature by default is switched off for every user. If
|
The web-presence feature by default is switched off for every user. If
|
||||||
user wants to use it, he should register on service `webpresence.example.org`,
|
user wants to use it, he should register on service `webpresence.example.org`,
|
||||||
which is accessible from Service Discovery.
|
which is accessible from Service Discovery.
|
||||||
There are several switches for web-presence:
|
There are several switches for web-presence,
|
||||||
|
but right now are all enabled and can't be disabled at all:
|
||||||
* Jabber ID: publish the presence in URIs that use the user's Jabber ID.
|
* Jabber ID: publish the presence in URIs that use the user's Jabber ID.
|
||||||
* Random ID: publish the presence in URIs that use a Random ID.
|
* Random ID: publish the presence in URIs that use a Random ID.
|
||||||
* XML: allow XML output.
|
* XML: allow XML output.
|
||||||
|
|
|
@ -467,16 +467,16 @@ send_message_registered(WP, To, Host, BaseURL, Lang) ->
|
||||||
{User, Server} = WP#webpresence.us,
|
{User, Server} = WP#webpresence.us,
|
||||||
JIDS = jid:encode({User, Server, <<"">>}),
|
JIDS = jid:encode({User, Server, <<"">>}),
|
||||||
Oavatar = case WP#webpresence.avatar of
|
Oavatar = case WP#webpresence.avatar of
|
||||||
false -> <<"">>;
|
%%false -> <<"">>;
|
||||||
true -> <<" avatar\n"
|
true -> <<" avatar\n"
|
||||||
" avatar/my.png\n">>
|
" avatar/my.png\n">>
|
||||||
end,
|
end,
|
||||||
Ojs = case WP#webpresence.js of
|
Ojs = case WP#webpresence.js of
|
||||||
false -> <<"">>;
|
%%false -> <<"">>;
|
||||||
true -> <<" js\n">>
|
true -> <<" js\n">>
|
||||||
end,
|
end,
|
||||||
Otext = case WP#webpresence.text of
|
Otext = case WP#webpresence.text of
|
||||||
false -> <<"">>;
|
%%false -> <<"">>;
|
||||||
true -> ?BC([
|
true -> ?BC([
|
||||||
<<" text\n"
|
<<" text\n"
|
||||||
" text/res/<">>, translate:translate(Lang, ?T("Resource")), <<">\n">>
|
" text/res/<">>, translate:translate(Lang, ?T("Resource")), <<">\n">>
|
||||||
|
@ -495,7 +495,7 @@ send_message_registered(WP, To, Host, BaseURL, Lang) ->
|
||||||
])
|
])
|
||||||
end,
|
end,
|
||||||
Oxml = case WP#webpresence.xml of
|
Oxml = case WP#webpresence.xml of
|
||||||
false -> <<"">>;
|
%%false -> <<"">>;
|
||||||
true -> <<" xml\n">>
|
true -> <<" xml\n">>
|
||||||
end,
|
end,
|
||||||
Allowed_type = case {Oimage, Oxml, Oavatar, Otext, Ojs} of
|
Allowed_type = case {Oimage, Oxml, Oavatar, Otext, Ojs} of
|
||||||
|
@ -506,21 +506,21 @@ send_message_registered(WP, To, Host, BaseURL, Lang) ->
|
||||||
{_, _, _, _, _} -> <<"image">>
|
{_, _, _, _, _} -> <<"image">>
|
||||||
end,
|
end,
|
||||||
{USERID_jid, Example_jid} = case WP#webpresence.jidurl of
|
{USERID_jid, Example_jid} = case WP#webpresence.jidurl of
|
||||||
false -> {<<"">>, <<"">>};
|
%%false -> {<<"">>, <<"">>};
|
||||||
true ->
|
true ->
|
||||||
JIDT = ?BC([<<"jid/">>, User, <<"/">>, Server]),
|
JIDT = ?BC([<<"jid/">>, User, <<"/">>, Server]),
|
||||||
{?BC([<<" ">>, JIDT, <<"\n">>]),
|
{?BC([<<" ">>, JIDT, <<"\n">>]),
|
||||||
?BC([<<" ">>, BaseURL, JIDT, <<"/">>, Allowed_type, <<"/\n">>])}
|
?BC([<<" ">>, BaseURL, JIDT, <<"/">>, Allowed_type, <<"/\n">>])}
|
||||||
end,
|
end,
|
||||||
{USERID_rid, Example_rid, Text_rid} = case WP#webpresence.ridurl of
|
{USERID_rid, Example_rid, Text_rid} = case WP#webpresence.ridurl of
|
||||||
false -> {<<"">>, <<"">>, <<"">>};
|
false -> {<<"">>, <<"">>, <<"">>}%;
|
||||||
RID when is_binary(RID) ->
|
%%RID when is_binary(RID) ->
|
||||||
RIDT = ?BC([<<"rid/">>, RID]),
|
%% RIDT = ?BC([<<"rid/">>, RID]),
|
||||||
{?BC([<<" ">>, RIDT, <<"\n">>]),
|
%% {?BC([<<" ">>, RIDT, <<"\n">>]),
|
||||||
?BC([<<" ">>, BaseURL, RIDT, <<"/">>, Allowed_type, <<"/\n">>]),
|
%% ?BC([<<" ">>, BaseURL, RIDT, <<"/">>, Allowed_type, <<"/\n">>]),
|
||||||
?BC([translate:translate(Lang, ?T("If you forget your RandomID, register again to receive this message.")), <<"\n">>,
|
%% ?BC([translate:translate(Lang, ?T("If you forget your RandomID, register again to receive this message.")), <<"\n">>,
|
||||||
translate:translate(Lang, ?T("To get a new RandomID, disable the option and register again.")), <<"\n">>])
|
%% translate:translate(Lang, ?T("To get a new RandomID, disable the option and register again.")), <<"\n">>])
|
||||||
}
|
%% }
|
||||||
end,
|
end,
|
||||||
Subject = ?BC([translate:translate(Lang, ?T("Web Presence")), <<": ">>, translate:translate(Lang, ?T("registered"))]),
|
Subject = ?BC([translate:translate(Lang, ?T("Web Presence")), <<": ">>, translate:translate(Lang, ?T("registered"))]),
|
||||||
Body = ?BC([translate:translate(Lang, ?T("You have registered:")), <<" ">>, JIDS, <<"\n\n">>,
|
Body = ?BC([translate:translate(Lang, ?T("You have registered:")), <<" ">>, JIDS, <<"\n\n">>,
|
||||||
|
@ -572,7 +572,7 @@ try_auto_webpresence(LUser, LServer) ->
|
||||||
#webpresence{};
|
#webpresence{};
|
||||||
allow ->
|
allow ->
|
||||||
#webpresence{us = {LUser, LServer},
|
#webpresence{us = {LUser, LServer},
|
||||||
ridurl = false,
|
ridurl = true,
|
||||||
jidurl = true,
|
jidurl = true,
|
||||||
xml = true,
|
xml = true,
|
||||||
avatar = true,
|
avatar = true,
|
||||||
|
|
Loading…
Reference in New Issue