matterhorn-chat / matterhorn

A feature-rich Unix terminal client for the Mattermost chat system
BSD 3-Clause "New" or "Revised" License
1.04k stars 76 forks source link

Render attachment text fields #799

Closed ethernet-zero closed 1 year ago

ethernet-zero commented 1 year ago

Please pardon my total lack of experience with Haskell, first of all. :stuck_out_tongue:

Mattermost supports attaching simple key/value fields to messages, but Matterhorn currently does not support displaying them. This patch adds a bulleted list at the end of messages displaying any attached key/value fields that they may have.

EDIT: Here's a screenshot of how the web client renders those fields. Screenshot from 2023-04-14 09-40-52 The last part of the message is a summary field attached to the message.

EDIT 2: This is how the same information would now be displayed by Matterhorn: Screenshot from 2023-04-14 12-38-32

jtdaugherty commented 1 year ago

Thanks for this patch! I'm wondering if you could post a screenshot of how the official web client displays the kinds of key/value fields that are being processed in this change. That would help me understand how best to format them in matterhorn, which would help me evaluate the patch.

ethernet-zero commented 1 year ago

Thanks for this patch! I'm wondering if you could post a screenshot of how the official web client displays the kinds of key/value fields that are being processed in this change. That would help me understand how best to format them in matterhorn, which would help me evaluate the patch.

Sure, I'll do it as soon as I can.

jtdaugherty commented 1 year ago

Looks good to me. Thanks for your work on this!