Changeset 9cf63ac
- Timestamp:
- 2016-03-31T18:49:52Z (9 years ago)
- Branches:
- master
- Children:
- 0d581bd
- Parents:
- fb62f132
- Location:
- protocols/twitter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
rfb62f132 r9cf63ac 958 958 twitter_remove_buddy(ic, cmd[1], NULL); 959 959 goto eof; 960 } else if (g_strcasecmp(cmd[0], "mute") == 0 && cmd[1]) { 961 twitter_mute_create_destroy(ic, cmd[1], 1); 962 goto eof; 963 } else if (g_strcasecmp(cmd[0], "unmute") == 0 && cmd[1]) { 964 twitter_mute_create_destroy(ic, cmd[1], 0); 965 goto eof; 960 966 } else if ((g_strcasecmp(cmd[0], "report") == 0 || 961 967 g_strcasecmp(cmd[0], "spam") == 0) && cmd[1]) { -
protocols/twitter/twitter_lib.c
rfb62f132 r9cf63ac 1653 1653 } 1654 1654 1655 /** 1656 * Mute or unmute a user 1657 */ 1658 void twitter_mute_create_destroy(struct im_connection *ic, char *who, int create) 1659 { 1660 char *args[2]; 1661 1662 args[0] = "screen_name"; 1663 args[1] = who; 1664 twitter_http(ic, create ? TWITTER_MUTES_CREATE_URL : TWITTER_MUTES_DESTROY_URL, 1665 twitter_http_post, ic, 1, args, 2); 1666 } 1667 1655 1668 void twitter_status_destroy(struct im_connection *ic, guint64 id) 1656 1669 { -
protocols/twitter/twitter_lib.h
rfb62f132 r9cf63ac 78 78 #define TWITTER_BLOCKS_DESTROY_URL "/blocks/destroy/" 79 79 80 /* Mute URLs */ 81 #define TWITTER_MUTES_CREATE_URL "/mutes/users/create.json" 82 #define TWITTER_MUTES_DESTROY_URL "/mutes/users/destroy.json" 83 80 84 /* Report spam */ 81 85 #define TWITTER_REPORT_SPAM_URL "/users/report_spam.json" … … 96 100 void twitter_direct_messages_new(struct im_connection *ic, char *who, char *message); 97 101 void twitter_friendships_create_destroy(struct im_connection *ic, char *who, int create); 102 void twitter_mute_create_destroy(struct im_connection *ic, char *who, int create); 98 103 void twitter_status_destroy(struct im_connection *ic, guint64 id); 99 104 void twitter_status_retweet(struct im_connection *ic, guint64 id);
Note: See TracChangeset
for help on using the changeset viewer.