Changeset d6b6906


Ignore:
Timestamp:
2011-08-03T21:45:49Z (13 years ago)
Author:
Jasper Spaans <j@…>
Branches:
master
Children:
5f1e78d
Parents:
3d952b5
Message:

Make it easier to retweet by id.
Currently, typing "rt 24" would retweet the last message from @24.
This patch allows one to retweet the tweet with id 24 by typing "rt #24".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r3d952b5 rd6b6906  
    491491                guint64 id;
    492492
    493                 if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) &&
     493                if (g_str_has_prefix(cmd[1], "#")) {
     494                    id = g_ascii_strtoull(cmd[1] + 1, NULL, 10);
     495                    if (id < TWITTER_LOG_LENGTH && td->log)
     496                        id = td->log[id].id;
     497                } else if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) &&
    494498                    (tud = bu->data) && tud->last_id)
    495499                        id = tud->last_id;
Note: See TracChangeset for help on using the changeset viewer.