| 820 chat = TRUE; |
820 chat = TRUE; |
| 821 else |
821 else |
| 822 chat = FALSE; |
822 chat = FALSE; |
| 823 |
823 |
| 824 if (swboard->conv == NULL) { |
824 if (swboard->conv == NULL) { |
| 825 if (chat) |
825 if (chat) |
| 826 swboard->conv = purple_find_chat(account->gc, swboard->chat_id); |
826 swboard->conv = purple_find_chat(account->gc, swboard->chat_id); |
| 827 else { |
827 else { |
| 828 swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, |
828 swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, |
| 829 who, account); |
829 who, account); |
| 830 if (swboard->conv == NULL) |
830 if (swboard->conv == NULL) |
| 1131 if (body == NULL) { |
1131 if (body == NULL) { |
| 1132 purple_debug_warning("msn", |
1132 purple_debug_warning("msn", |
| 1133 "Unable to parse invite msg body.\n"); |
1133 "Unable to parse invite msg body.\n"); |
| 1134 return; |
1134 return; |
| 1135 } |
1135 } |
| 1136 |
1136 |
| 1137 /* |
1137 /* |
| 1138 * GUID is NOT always present but Invitation-Command and Invitation-Cookie |
1138 * GUID is NOT always present but Invitation-Command and Invitation-Cookie |
| 1139 * are mandatory. |
1139 * are mandatory. |
| 1140 */ |
1140 */ |
| 1141 command = g_hash_table_lookup(body, "Invitation-Command"); |
1141 command = g_hash_table_lookup(body, "Invitation-Command"); |
| 1148 ); |
1148 ); |
| 1149 return; |
1149 return; |
| 1150 |
1150 |
| 1151 } else if (!strcmp(command, "INVITE")) { |
1151 } else if (!strcmp(command, "INVITE")) { |
| 1152 const gchar *guid = g_hash_table_lookup(body, "Application-GUID"); |
1152 const gchar *guid = g_hash_table_lookup(body, "Application-GUID"); |
| 1153 |
1153 |
| 1154 if (guid == NULL) { |
1154 if (guid == NULL) { |
| 1155 purple_debug_warning("msn", |
1155 purple_debug_warning("msn", |
| 1156 "Invite msg missing Application-GUID.\n"); |
1156 "Invite msg missing Application-GUID.\n"); |
| 1157 |
1157 |
| 1158 accepted = TRUE; |
1158 accepted = TRUE; |
| 1187 } else { |
1187 } else { |
| 1188 const gchar *application = g_hash_table_lookup(body, "Application-Name"); |
1188 const gchar *application = g_hash_table_lookup(body, "Application-Name"); |
| 1189 purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n", |
1189 purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n", |
| 1190 guid, application ? application : "(null)"); |
1190 guid, application ? application : "(null)"); |
| 1191 } |
1191 } |
| 1192 |
1192 |
| 1193 if (!accepted) { |
1193 if (!accepted) { |
| 1194 MsnSwitchBoard *swboard = cmdproc->data; |
1194 MsnSwitchBoard *swboard = cmdproc->data; |
| 1195 char *text; |
1195 char *text; |
| 1196 MsnMessage *cancel; |
1196 MsnMessage *cancel; |
| 1197 |
1197 |