X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/f2d227db9c3b556c7b0e1cfe735ccc54311850e5..5da3ea038d1e9f9a2634d5ab137aef6989a3a789:/memory.go?ds=inline diff --git a/memory.go b/memory.go index 792fe21..d7fff4e 100644 --- a/memory.go +++ b/memory.go @@ -543,6 +543,15 @@ func (m *Memory) View() string { return m.chat.Render() } +// ViewWithout returns the chat view without the leaf lines of the messages in +// skip. +func (m *Memory) ViewWithout(skip map[int]bool) string { + m.mutex.Lock() + defer m.mutex.Unlock() + + return m.chat.RenderWithout(skip) +} + // Len returns the number of messages in the log. func (m *Memory) Len() int { m.mutex.Lock()