public void HandlesValidGroupUnarchive() { var groups = new List <Group> { new Group { Id = "CHANID1", IsArchived = true }, new Group { Id = "CHANID2", IsArchived = false } }; var mockState = SetupGroupsMock(groups); var message = new GroupUnarchive { Type = EventType.GroupUnarchive, Channel = "CHANID1" }; RunHandler(message, mockState); Assert.Equal(2, groups.Count); Assert.Equal(false, groups.First(c => c.Id == "CHANID1").IsArchived); Assert.Equal(false, groups.First(c => c.Id == "CHANID2").IsArchived); }
private void GroupUnarchive(GroupUnarchive message) { var group = base.BotState.Groups.FirstOrDefault(c => c.Id == message.Channel); if (group == null) { return; } group.IsArchived = false; }
public void HandleGroupUnarchive(GroupUnarchive unarchive) { GroupLookup[unarchive.channel].is_archived = false; }