(direct NetworkDirectRoomRecord)
| 1540 | } |
| 1541 | |
| 1542 | func networkDirectBundle(direct NetworkDirectRoomRecord) outputBundle { |
| 1543 | return outputBundle{ |
| 1544 | jsonValue: contract.NetworkDirectRoomResponse{Direct: direct}, |
| 1545 | human: func() (string, error) { |
| 1546 | return renderHumanSection("Network Direct Room", networkDirectKeyValues(direct)), nil |
| 1547 | }, |
| 1548 | toon: func() (string, error) { |
| 1549 | return renderToonObject( |
| 1550 | "network_direct", |
| 1551 | []string{ |
| 1552 | networkChannelKey, |
| 1553 | networkDirectIDKey, |
| 1554 | "peer_a", |
| 1555 | "peer_b", |
| 1556 | networkOpenedAtKey, |
| 1557 | networkLastActivityAtKey, |
| 1558 | networkMessageCountKey, |
| 1559 | networkOpenWorkCountKey, |
| 1560 | networkLastMessagePreviewKey, |
| 1561 | }, |
| 1562 | []string{ |
| 1563 | direct.Channel, |
| 1564 | direct.DirectID, |
| 1565 | direct.PeerA, |
| 1566 | direct.PeerB, |
| 1567 | formatTimePtr(direct.OpenedAt), |
| 1568 | formatTimePtr(direct.LastActivityAt), |
| 1569 | strconv.Itoa(direct.MessageCount), |
| 1570 | strconv.Itoa(direct.OpenWorkCount), |
| 1571 | direct.LastMessagePreview, |
| 1572 | }, |
| 1573 | ), nil |
| 1574 | }, |
| 1575 | } |
| 1576 | } |
| 1577 | |
| 1578 | func networkDirectMessagesBundle(messages []NetworkConversationMessageRecord) outputBundle { |
| 1579 | return networkMessagesBundle(contract.NetworkDirectRoomMessagesResponse{Messages: messages}, messages) |
no test coverage detected