add reactions file to 9P session tree

This commit is contained in:
lkn 2026-07-27 19:59:50 +02:00
parent 57053c4e48
commit ecbe8067f2
1 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,14 @@ func (h *sessionHelper) fileSpec(name string, mode os.FileMode) fs.FileSpec {
h.sess.mu.RUnlock()
return data, nil
}
case "reactions":
fs.Read = func() ([]byte, error) {
data, err := json.Marshal(h.sess.Core.Reactions())
if err != nil {
return nil, err
}
return append(data, '\n'), nil
}
case "chat":
fs.Read = func() ([]byte, error) {
h.sess.mu.RLock()