sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Incoming deletions are not indicated anywhere #145

Open dgw opened 6 years ago

dgw commented 6 years ago

bitlbee-discord handles incoming edits and message pins/unpins, but it doesn't indicate anywhere when messages are deleted. If this is an intentional design choice, then shut me down right now :wink:, but if it's just "not implemented (yet)" then let this be the issue that gets someone to do it. (Could be me, but it'll be a while; I have quite a long list of tasks already from other projects.)

sm00th commented 6 years ago

IIRC it was a design decision. With deletes we don't get much new info, so if implemented the same way as edits are we will be just duplicating the message with "deleted" tag which I thought nobody (of the 4 users back then, including me) would want. I am open for suggestions though, if you have a clever way to represent deletes or have a good argument on why would anyone want duplicate messages - I am glad to discuss this.

dgw commented 6 years ago

Unlike with edits, deletions probably don't need to include the full message. It would be enough to say "DELETED: First 20 chars or so..." and leave it at that, I think.

IRCv3 has a draft spec for edits/deletions that bitlbee-discord could use eventually, but that's so far off from practical use that it's not even worth making a tracking issue for it yet.

TReKiE commented 5 years ago

I'd like speak in favour of this as an option. I frequently find myself looking like a fool because I'm responding to a message that is no longer there, or in some worse case scenarios, people misunderstand what i'm responding to and unfortunate miscommunication results.

I think @dgw's proposal would work well. Although I would not object to the whole thing being duplicated, as that's what I frequently see with edits already, since it's usually just an edited character or word addition.

Alcaro commented 5 years ago
[17:40:26] >> {"t":"MESSAGE_DELETE","s":6333,"op":0,"d":{"id":"495620742109593602","channel_id":"381187250265784320","guild_id":"161245277179609089"}}
[17:40:32] >> {"t":"MESSAGE_DELETE","s":6336,"op":0,"d":{"id":"495620687973842965","channel_id":"381187250265784320","guild_id":"161245277179609089"}}
[17:47:02] >> {"t":"MESSAGE_DELETE","s":6588,"op":0,"d":{"id":"495622519877795847","channel_id":"381187250265784320","guild_id":"161245277179609089"}}

Getting message text (or even author) from that would be tricky at best... the only way I can see would be to keep track of the last 50 messages in the channel, and hope nobody deletes old stuff.

Maybe we should do exactly that (or first 20 chars of the last 50 messages, so we can put it in a fixed-width struct and not worry about malloc), but it's not as easy as edits, at least.