- /* If this isn't the configuration room, or if this isn't a MIME
- * message, don't bother.
- */
- if (msg->cm_fields['O'] == NULL) return(0);
- if (!strcasecmp(msg->cm_fields['O'], USERCONFIGROOM)) is_UserConf = 1;
- if (!strcasecmp(msg->cm_fields['O'], ADDRESS_BOOK_ROOM)) is_GAB = 1;
+ /* We're interested in user config rooms only. */
+
+ if ( (strlen(CC->room.QRname) >= 12) && (!strcasecmp(&CC->room.QRname[11], USERCONFIGROOM)) ) {
+ is_UserConf = 1; /* It's someone's config room */
+ }
+ MailboxName(roomname, sizeof roomname, &CC->user, USERCONFIGROOM);
+ if (!strcasecmp(CC->room.QRname, roomname)) {
+ is_UserConf = 1;
+ is_MY_UserConf = 1; /* It's MY config room */
+ }
+ if (!strcasecmp(CC->room.QRname, ADDRESS_BOOK_ROOM)) {
+ is_GAB = 1; /* It's the Global Address Book */
+ }
+