# HG changeset patch # User mikanbako # Date 1217646905 -32400 # Node ID c4a8afde91c068c7feb318735915635b55919563 # Parent 002538feba6e31c91741f280875e992d26623f88 fixed a problem that a notification is not prevented when a message was written from API. diff -r 002538feba6e -r c4a8afde91c0 pidgin-twitter.c --- a/pidgin-twitter.c Sat Aug 02 11:31:37 2008 +0900 +++ b/pidgin-twitter.c Sat Aug 02 12:15:05 2008 +0900 @@ -475,6 +475,7 @@ PurpleConversation *conv; GList *stp; const gchar *start; + PurpleMessageFlags msg_flags; g_return_if_fail(url_text != NULL); @@ -515,10 +516,16 @@ gchar *msg = NULL; msg = g_strdup_printf("%s: %s", st->screen_name, st->text); + msg_flags = PURPLE_MESSAGE_RECV; + + /* suppress notification of this writing message. */ + if(purple_prefs_get_bool(OPT_PREVENT_NOTIFICATION)) + msg_flags |= PURPLE_MESSAGE_SYSTEM; + purple_conv_im_write(conv->u.im, "twitter@twitter.com", msg, - PURPLE_MESSAGE_RECV, + msg_flags, st->time); lastid = st->id;