localslackirc
localslackirc copied to clipboard
Missing context when users "share message"
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?
Do you know how the original slack irc gateway handled this?
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.
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)
The attachments seem to be deprecated in favour of a blocks, which are defined recursively :(