mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 14:10:10 +00:00
properly store permission overwrites & updates
This commit is contained in:
parent
3deb2b1002
commit
87e23ec583
@ -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)
|
||||
)
|
||||
)";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user