mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
properly store permission overwrites & updates
This commit is contained in:
@@ -1218,6 +1218,9 @@ void DiscordClient::HandleGatewayChannelUpdate(const GatewayMessage &msg) {
|
||||
if (cur.has_value()) {
|
||||
cur->update_from_json(msg.Data);
|
||||
m_store.SetChannel(id, *cur);
|
||||
if (cur->PermissionOverwrites.has_value())
|
||||
for (const auto &p : *cur->PermissionOverwrites)
|
||||
m_store.SetPermissionOverwrite(id, p.ID, p);
|
||||
m_signal_channel_update.emit(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,7 +753,8 @@ bool Store::CreateTables() {
|
||||
channel_id INTEGER NOT NULL,
|
||||
type INTEGER NOT NULL,
|
||||
allow INTEGER NOT NULL,
|
||||
deny INTEGER NOT NULL
|
||||
deny INTEGER NOT NULL,
|
||||
PRIMARY KEY(id, channel_id)
|
||||
)
|
||||
)";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user