Skip to content

Commit

Permalink
Merge PR mumble-voip#6458: FEAT(client): Clear local mutes on Mumble …
Browse files Browse the repository at this point in the history
…restart
  • Loading branch information
Hartmnt authored Jun 25, 2024
2 parents 56ee182 + 9b81fac commit 7fd66b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mumble/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ void Database::setLocalMuted(const QString &hash, bool muted) {
execQueryAndLogFailure(query);
}

void Database::clearLocalMuted() {
QSqlQuery query(db);
query.prepare(QLatin1String("DELETE FROM `muted`"));
execQueryAndLogFailure(query);
}

ChannelFilterMode Database::getChannelFilterMode(const QByteArray &server_cert_digest, const unsigned int channel_id) {
QSqlQuery query(db);

Expand Down
1 change: 1 addition & 0 deletions src/mumble/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Database : public QObject {

bool isLocalMuted(const QString &hash);
void setLocalMuted(const QString &hash, bool muted);
void clearLocalMuted();

float getUserLocalVolume(const QString &hash);
void setUserLocalVolume(const QString &hash, float volume);
Expand Down
1 change: 1 addition & 0 deletions src/mumble/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ int main(int argc, char **argv) {

// Initialize database
Global::get().db = new Database(QLatin1String("main"));
Global::get().db->clearLocalMuted();

#ifdef USE_ZEROCONF
// Initialize zeroconf
Expand Down

0 comments on commit 7fd66b5

Please sign in to comment.