mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix crash when loading room from DB older than ffa07c6
, 23.04
Before commit ffa07c6
, the subject_author was just the author nick,
since that commit, subject_author contains {author nick, JID}.
This commit is contained in:
parent
57d404a99b
commit
706424f0d2
@ -4201,7 +4201,10 @@ set_opts2([{Opt, Val} | Opts], StateData) ->
|
||||
is_list(Val) -> Val
|
||||
end,
|
||||
StateData#state{subject = Subj};
|
||||
subject_author -> StateData#state{subject_author = Val};
|
||||
subject_author when is_tuple(Val) ->
|
||||
StateData#state{subject_author = Val};
|
||||
subject_author when is_binary(Val) -> % ejabberd 23.04 or older
|
||||
StateData#state{subject_author = {Val, #jid{}}};
|
||||
hats_users ->
|
||||
Hats = maps:from_list(
|
||||
lists:map(fun({U, H}) -> {U, maps:from_list(H)} end,
|
||||
|
Loading…
Reference in New Issue
Block a user