fix possible nil
This commit is contained in:
parent
c6049a7451
commit
4ec51b64eb
1 changed files with 4 additions and 0 deletions
|
|
@ -95,6 +95,10 @@ func (s roomSettings) ContentOptions() *utils.ContentOptions {
|
|||
|
||||
func (b *Bot) getRoomSettings(roomID id.RoomID) (roomSettings, error) {
|
||||
config, err := b.lp.GetRoomAccountData(roomID, acRoomSettingsKey)
|
||||
if config == nil {
|
||||
config = map[string]string{}
|
||||
}
|
||||
|
||||
return config, utils.UnwrapError(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue