localslackirc icon indicating copy to clipboard operation
localslackirc copied to clipboard

Missing context when users "share message"

Open abliss opened this issue 5 years ago • 4 comments

When users "share message" and add a comment, the RTM includes an "attachment" field on the message. The web client displays the text of this message, and the user sometimes adds a comment about it. This currently displays in IRC as a context-free comment since the attachment is dropped. Not sure how this should be rendered. Maybe just insert a new message, as if sent by the sharing user, with the attachment in a quote?

abliss avatar May 07 '19 15:05 abliss

Do you know how the original slack irc gateway handled this?

ltworf avatar May 07 '19 16:05 ltworf

No, I never used the original gateway. My impression is that they retired it precisely because they wanted to add concepts like this that didn't fit naturally into the irc model.

abliss avatar May 07 '19 18:05 abliss

When a user shares a message with an attachment, the attachment appears in a random channel (in my case a private one where the file author isn't present) as if they just uploaded it there, sometimes repeatedly.

Value {'type': 'file_shared', 'channel_id': 'C03UGEJ38', 'file_id': 'FJU1ZANSC', 'user_id': 'UJB8802EQ', 'file': {'id': 'FJU1ZANSC'}, 'event_ts': '1558316223.003000'} does not contain fields: {'ts'} which are necessary for type <class 'slack.FileShared'>
Value {'type': 'file_shared', 'channel_id': 'CAADVRQ6B', 'file_id': 'FJU1ZANSC', 'user_id': 'UJB8802EQ', 'file': {'id': 'FJU1ZANSC'}, 'event_ts': '1558317035.003100'} does not contain fields: {'ts'} which are necessary for type <class 'slack.FileShared'>
Value {'type': 'file_shared', 'channel_id': 'CAADVRQ6B', 'file_id': 'FJU1ZANSC', 'user_id': 'UJB8802EQ', 'file': {'id': 'FJU1ZANSC'}, 'event_ts': '1558317141.003200'} does not contain fields: {'ts'} which are necessary for type <class 'slack.FileShared'>

Appears in the lsirc output (shared to 2 different channels)

daniel-Jones avatar May 20 '19 01:05 daniel-Jones

The attachments seem to be deprecated in favour of a blocks, which are defined recursively :(

ltworf avatar May 26 '22 09:05 ltworf