aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--src/compose.c3
-rw-r--r--src/send_message.c22
-rw-r--r--src/send_message.h3
5 files changed, 36 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ebd750ea..9c608195 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-17
+
+ * src/compose.c
+ src/send_message.[ch]: send_message_set_reply_flag(): check reply
+ target's Message-Id when adding reply flags.
+
2007-07-13
* libsylph/prefs_common.[ch]: prefs_common_junk_folder_rename_path():
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 99aa3c12..6f9ebd07 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,9 @@
+2007-07-17
+
+ * src/compose.c
+ src/send_message.[ch]: send_message_set_reply_flag(): 返信フラグ
+ を追加する場合は返信対象の Message-Id をチェックするようにした。
+
2007-07-13
* libsylph/prefs_common.[ch]: prefs_common_junk_folder_rename_path():
diff --git a/src/compose.c b/src/compose.c
index a405e61a..fa228341 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -2944,7 +2944,8 @@ static gint compose_send(Compose *compose)
}
if (compose->reply_target)
- send_message_set_reply_flag(compose->reply_target);
+ send_message_set_reply_flag(compose->reply_target,
+ compose->inreplyto);
else if (compose->forward_targets)
send_message_set_forward_flags
(compose->forward_targets);
diff --git a/src/send_message.c b/src/send_message.c
index 486d659c..a0c93c94 100644
--- a/src/send_message.c
+++ b/src/send_message.c
@@ -355,7 +355,8 @@ gint send_message_queue_all(FolderItem *queue, gboolean save_msgs,
}
if (qinfo->reply_target)
- send_message_set_reply_flag(qinfo->reply_target);
+ send_message_set_reply_flag(qinfo->reply_target,
+ msginfo->inreplyto);
else if (qinfo->forward_targets)
send_message_set_forward_flags(qinfo->forward_targets);
@@ -407,7 +408,7 @@ gint send_message_queue_all(FolderItem *queue, gboolean save_msgs,
return ret;
}
-gint send_message_set_reply_flag(const gchar *target)
+gint send_message_set_reply_flag(const gchar *target, const gchar *msgid)
{
FolderItem *item;
gint num;
@@ -416,6 +417,9 @@ gint send_message_set_reply_flag(const gchar *target)
g_return_val_if_fail(target != NULL, -1);
+ debug_print("send_message_set_reply_flag(): "
+ "setting reply flag to: %s\n", target);
+
summaryview = main_window_get()->summaryview;
item = folder_find_item_and_num_from_id(target, &num);
@@ -425,6 +429,11 @@ gint send_message_set_reply_flag(const gchar *target)
if (summaryview->folder_item == item) {
msginfo = summary_get_msginfo_by_msgnum(summaryview, num);
if (msginfo) {
+ if (msgid && strcmp2(msgid, msginfo->msgid) != 0) {
+ debug_print("send_message_set_reply_flag(): "
+ "message-id mismatch\n");
+ return -1;
+ }
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_FORWARDED);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_REPLIED);
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_FLAG_CHANGED);
@@ -437,6 +446,12 @@ gint send_message_set_reply_flag(const gchar *target)
} else {
msginfo = procmsg_get_msginfo(item, num);
if (msginfo) {
+ if (msgid && strcmp2(msgid, msginfo->msgid) != 0) {
+ debug_print("send_message_set_reply_flag(): "
+ "message-id mismatch\n");
+ procmsg_msginfo_free(msginfo);
+ return -1;
+ }
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_FORWARDED);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_REPLIED);
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_FLAG_CHANGED);
@@ -465,6 +480,9 @@ gint send_message_set_forward_flags(const gchar *targets)
g_return_val_if_fail(targets != NULL, -1);
+ debug_print("send_message_set_forward_flags(): "
+ "setting forward flags to: %s\n", targets);
+
summaryview = main_window_get()->summaryview;
paths = g_strsplit(targets, "\n", 0);
diff --git a/src/send_message.h b/src/send_message.h
index e54dff8c..7841f62e 100644
--- a/src/send_message.h
+++ b/src/send_message.h
@@ -53,7 +53,8 @@ gint send_message_queue_all (FolderItem *queue,
gboolean save_msgs,
gboolean filter_msgs);
-gint send_message_set_reply_flag (const gchar *reply_target);
+gint send_message_set_reply_flag (const gchar *reply_target,
+ const gchar *msgid);
gint send_message_set_forward_flags (const gchar *forward_targets);
#endif /* __SEND_H__ */