Changeset dfaa46d


Ignore:
Timestamp:
2015-01-26T07:50:45Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
ce402b2
Parents:
73ee390
git-author:
William Pettersson <william.pettersson@…> (26-01-15 07:37:14)
git-committer:
dequis <dx@…> (26-01-15 07:50:45)
Message:

twitter: Add raw reply support

By default, "reply" prepends the username of the tweet being replied to. This
adds support for a "rawreply" command which does not prepend this username.
This is useful for "replying" to your own tweet to maintain a chain of tweets
on a singular topic.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/user-guide/commands.xml

    r73ee390 rdfaa46d  
    847847                                <varlistentry><term>rt &lt;screenname|#id&gt;</term><listitem><para>Retweet someone's last Tweet (or one with the given ID)</para></listitem></varlistentry>
    848848                                <varlistentry><term>reply &lt;screenname|#id&gt;</term><listitem><para>Reply to a Tweet (with a reply-to reference)</para></listitem></varlistentry>
     849                                <varlistentry><term>rawreply &lt;screenname|#id&gt;</term><listitem><para>Reply to a Tweet (with no reply-to reference)</para></listitem></varlistentry>
    849850                                <varlistentry><term>report &lt;screenname|#id&gt;</term><listitem><para>Report the given user (or the user who posted the tweet with the given ID) for sending spam. This will also block them.</para></listitem></varlistentry>
    850851                                <varlistentry><term>follow &lt;screenname&gt;</term><listitem><para>Start following a person</para></listitem></varlistentry>
  • protocols/twitter/twitter.c

    r73ee390 rdfaa46d  
    932932                in_reply_to = id;
    933933                allow_post = TRUE;
     934        } else if (g_strcasecmp(cmd[0], "rawreply") == 0 && cmd[1] && cmd[2]) {
     935                id = twitter_message_id_from_command_arg(ic, cmd[1], NULL);
     936                if (!id) {
     937                        twitter_log(ic, "Tweet `%s' does not exist", cmd[1]);
     938                        goto eof;
     939                }
     940                message = cmd[2];
     941                in_reply_to = id;
     942                allow_post = TRUE;
    934943        } else if (g_strcasecmp(cmd[0], "post") == 0) {
    935944                message += 5;
Note: See TracChangeset for help on using the changeset viewer.