25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

mod_muc_log: Support allowpm introduced in 2bd61ab

This commit is contained in:
Badlop 2024-03-05 09:57:58 +01:00
parent 6bdbafcd5c
commit c0055b7a7f

View File

@ -583,7 +583,7 @@ put_header(F, Room, Date, CSSFile, Lang, Hour_offset,
"class=\"nav\" href=\"~ts\">&gt;</a></span></di" "class=\"nav\" href=\"~ts\">&gt;</a></span></di"
"v>">>, "v>">>,
[Date, Date_prev, Date_next]), [Date, Date_prev, Date_next]),
case {htmlize(Room#room.subject_author), case {htmlize(prepare_subject_author(Room#room.subject_author)),
htmlize(Room#room.subject)} htmlize(Room#room.subject)}
of of
{<<"">>, <<"">>} -> ok; {<<"">>, <<"">>} -> ok;
@ -783,6 +783,12 @@ roomconfig_to_string(Options, Lang, FileFormat) ->
(htmlize(tr(Lang, misc:atom_to_binary(T)), (htmlize(tr(Lang, misc:atom_to_binary(T)),
FileFormat))/binary, FileFormat))/binary,
"\"</div>">>; "\"</div>">>;
allowpm ->
<<"<div class=\"rcot\">",
OptText/binary, ": \"",
(htmlize(tr(Lang, misc:atom_to_binary(T)),
FileFormat))/binary,
"\"</div>">>;
_ -> <<"\"", T/binary, "\"">> _ -> <<"\"", T/binary, "\"">>
end end
end, end,
@ -898,6 +904,11 @@ get_room_occupants(RoomJIDString) ->
[] []
end. end.
prepare_subject_author({Nick, _}) ->
Nick;
prepare_subject_author(SA) ->
SA.
-spec get_room_state(binary(), binary()) -> {ok, mod_muc_room:state()} | error. -spec get_room_state(binary(), binary()) -> {ok, mod_muc_room:state()} | error.
get_room_state(RoomName, MucService) -> get_room_state(RoomName, MucService) ->