meebey / smuxi

Smuxi is an user-friendly and free IRC client for Linux, Windows and Mac OS X based on GNOME / GTK+
https://smuxi.im/
GNU General Public License v2.0
172 stars 46 forks source link

Engine: allow Message to have URLs (so that tweets can have links) #225

Closed knocte closed 8 years ago

knocte commented 9 years ago

In some engines such as Twitter, each message can contain a publicly accessible URL associated to it. So we add the possibility to include this URL in MessageModel as a property, so that Frontend-GNOME can use it as a link from its timestamp (inspired in how the Twitter web UI works: if you click on the date of the message, you go to the URL of the single tweet).

knocte commented 9 years ago

ping :)

meebey commented 8 years ago
[2015-05-07 14:48:54] <meebey> but for twitter it would be the tweet id
[2015-05-07 14:48:57] <meebey> not the url ;)
[2015-05-07 14:49:04] <meebey> the frontend can still make it a Twitter link
[2015-05-07 14:49:11] <knocte> good point
[2015-05-07 14:49:23] <meebey> I made already Twitter extensions
[2015-05-07 14:49:33] <meebey> in Frontend-GNOME-Twitter I think

MessageModel should be extended with (string) ID and not context-less Url to points to something, it would be ok to do this in MessageTextView itself, because I don't think protocols can extend that behavior at the moment.

knocte commented 8 years ago

it would be ok to do this in MessageTextView itself

But, MessageTextView.cs shouldn't hardcode a twitter.com URL!! That would look like a huge hack to me.

knocte commented 8 years ago

But, MessageTextView.cs shouldn't hardcode a twitter.com URL!!

(Because MessageTextView.cs is inside Frontend-GNOME, not Frontend-GNOME-Twitter.)

knocte commented 8 years ago

because I don't think protocols can extend that behavior at the moment.

I've made the behaviour extensible, and Frontend-GNOME-Twitter is the first frontend to override it. Please review the new approach! Thanks

meebey commented 8 years ago

Merged in e2b6670c7d7e5580aa872944a838e92090f564a5