pru-mike / rocketchat-jira-webhook

Outgoing Rocket.Chat webhook integration that summarizes mentioned JIRA issues and Confluence documents
The Unlicense
5 stars 1 forks source link

Jira Issue Details always expanded #4

Open LordNatter opened 8 months ago

LordNatter commented 8 months ago

Hello,

first and foremost thank you for porting and maintaining this wonderful integration.

We have a little issue with the trigger and i wonder if there's anything one can do about it.

The trigger worked out of the box with rocket.chat 6.46 but if we post an issue the details are always expanded by default: play

Which results in a wall of text. We reduced the fields to ["Status", "Assignee", "Created", "Updated"] and the max_text_length to "1" because otherwise the chat is flooded with text.

We had that issue also with https://github.com/gustavkarlsson/rocketchat-jira-trigger (the old one) and i didn't found any way to change that behaviour. I tested with Chrome, Firefox and also the Windows Desktop App. Version 6.0.1 of Rocket-Chat Server was working fine, Versions after that have that Problem.

If you know any way to change the appearance of the posted message regarding the button state i would be very glad. This element seems to cause the issue.

<button type="button" title="Einblenden" class="rcx-box rcx-box--full rcx-button--mini-square rcx-button--square rcx-button--icon rcx-button rcx-css-wcp0mp" data-title="Ausblenden"><i aria-hidden="true" class="rcx-box rcx-box--full rcx-icon--name-chevron-left rcx-icon rcx-css-1tg7yd0">{</i></button>

Any help would be appreciated.

Thank you very much!

pru-mike commented 8 months ago

Hello, Oh yes, we have this annoying behavior too. There is an option for this in API (collapsed: true), but it looks like it doesn't work in newer version of Rocket.Chat Server. Where is an open issue https://github.com/RocketChat/Rocket.Chat/issues/29276, so I think i cannot fix this in webhook, it's on server side. But where is a work around, you can disable attachment expansion in client configuration, to do so you need (on client) to going to "Account => Preferences => Messages => Collapse Embedded Media by Default => (turn on)"

hardikbhatia777 commented 7 months ago

Hi, Sorry it took so long, I'm sure this was really annoying to deal with. I've added a PR to resolve this and it should (hopefully) be fixed in the next release :)