botserv: ASSIGN / UNASSIGN a bot to a channel
A channel gains a typed assigned_bot (event-logged, snapshotted). ASSIGN <#channel> <bot> / UNASSIGN <#channel> is founder-gated (or admin oper). The engine reconcile now also diffs channel assignments against tracked bot memberships: a live bot IJOINs its assigned channels and PARTs unassigned ones (new ServiceJoin/ServicePart actions), at burst and after commands; a deleted bot's memberships are dropped. Engine test for join-on-assign / part-on-unassign.
This commit is contained in:
parent
f94b0afcd9
commit
b25870e14b
6 changed files with 170 additions and 4 deletions
|
|
@ -139,6 +139,8 @@ fn to_wire(entry: &LogEntry) -> Option<ReplicationEvent> {
|
|||
| Event::ChannelTopicSet { .. }
|
||||
| Event::ChannelSuspended { .. }
|
||||
| Event::ChannelUnsuspended { .. }
|
||||
| Event::ChannelBotAssigned { .. }
|
||||
| Event::ChannelBotUnassigned { .. }
|
||||
| Event::BotAdded(_)
|
||||
| Event::BotRemoved { .. } => return None,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue