Modify

#1289 new defect

[PATCH] twitter: maintain mentions when replying

Reported by: jhl <james-bitlbee-trac@…> Owned by:
Priority: normal Milestone:
Component: Unspecified / other Version: Unspecified
Keywords: Cc:
IRC client+version: Client-independent Operating System: Public server
OS version/distro:

Description

At present, when you reply to a tweet, that tweet's author is @mentioned in the reply. This is unintuitive in two cases:

  1. When you reply to a tweet that mentioned multiple people, those mentions are not carried over, breaking the thread.
  1. When you reply to one of your own replies, the new reply gets @yourself at the beginning, so the intended recipient won't be notified.

The attached patch addresses this by introducing function twitter_format_reply, which looks at the original message being replied to to create the mention list at the beginning. This is composed as:

  1. the original message author (if not us),
  2. any mentions at the start of the original message, except us or the original author

Mentions are assumed to be space-separated words starting with @; as soon as a non-space, non-@ character is found parsing stops.

To support this, the text of each tweet is stored in the twitter_log_data struct.

Attachments (1)

bitlbee-twitter-reply.patch (3.8 KB) - added by jhl <james-bitlbee-trac@…> at 2017-03-27T07:59:37Z.

Download all attachments as: .zip

Change History (3)

Changed at 2017-03-27T07:59:37Z by jhl <james-bitlbee-trac@…>

Attachment: bitlbee-twitter-reply.patch added

comment:1 Changed at 2017-03-27T08:00:32Z by jhl <james-bitlbee-trac@…>

Oops, sorry - forgot to set the enhancement label!

comment:2 Changed at 2017-03-27T15:17:08Z by dx

For some reason I can't access that attachment, please use pull requests instead https://github.com/bitlbee/bitlbee/pulls

Modify Ticket

Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.