diff options
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r-- | src/bridge/bridge.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index fcfcc24..23ecfe9 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -23,12 +23,14 @@ static std::string in_encoding_for(const Bridge& bridge, const Iid& iid) #ifdef USE_DATABASE const auto jid = bridge.get_bare_jid(); auto options = Database::get_irc_channel_options_with_server_default(jid, iid.get_server(), iid.get_local()); - return options.col<Database::EncodingIn>(); + auto result = options.col<Database::EncodingIn>(); + if (!result.empty()) + return result; #else (void)bridge; (void)iid; - return {"ISO-8859-1"}; #endif + return {"ISO-8859-1"}; } Bridge::Bridge(std::string user_jid, BiboumiComponent& xmpp, std::shared_ptr<Poller>& poller): |