Added ROOM_NOTIFY_DM to protocols' room flags

This commit is contained in:
Jaidyn Ann 2021-08-19 01:04:57 -05:00
parent d8d89d245e
commit 9d760cd277
3 changed files with 10 additions and 6 deletions

View File

@ -233,7 +233,9 @@ IrcProtocol::Process(BMessage* msg)
meta.AddInt32("im_what", IM_ROOM_METADATA); meta.AddInt32("im_what", IM_ROOM_METADATA);
meta.AddString("chat_id", chat_id); meta.AddString("chat_id", chat_id);
meta.AddInt32("room_default_flags", meta.AddInt32("room_default_flags",
ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS); ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS | ROOM_NOTIFY_DM);
if (_IsChannelName(chat_id) == false)
meta.AddInt32("room_disallowed_flags", ROOM_AUTOJOIN);
_SendMsg(&meta); _SendMsg(&meta);
} }
break; break;

View File

@ -264,7 +264,7 @@ PurpleApp::ImMessage(BMessage* msg)
meta.AddString("chat_id", purple_conversation_get_name(conv)); meta.AddString("chat_id", purple_conversation_get_name(conv));
meta.AddString("chat_name", purple_conversation_get_title(conv)); meta.AddString("chat_name", purple_conversation_get_title(conv));
meta.AddInt32("room_default_flags", meta.AddInt32("room_default_flags",
0 | ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS); 0 | ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS | ROOM_NOTIFY_DM);
if (chat != NULL) if (chat != NULL)
meta.AddString("subject", purple_conv_chat_get_topic(chat)); meta.AddString("subject", purple_conv_chat_get_topic(chat));
SendMessage(purple_conversation_get_account(conv), meta); SendMessage(purple_conversation_get_account(conv), meta);

View File

@ -244,8 +244,10 @@ JabberHandler::Process(BMessage* msg)
BMessage metadata(IM_MESSAGE); BMessage metadata(IM_MESSAGE);
metadata.AddInt32("im_what", IM_ROOM_METADATA); metadata.AddInt32("im_what", IM_ROOM_METADATA);
metadata.AddString("chat_id", chat_id); metadata.AddString("chat_id", chat_id);
metadata.AddInt32("room_default_flags", 0 | ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS); metadata.AddInt32("room_default_flags", 0 | ROOM_LOG_LOCALLY
metadata.AddInt32("room_disallowed_flags", 0 | ROOM_AUTOJOIN | ROOM_AUTOCREATE); | ROOM_POPULATE_LOGS | ROOM_NOTIFY_DM);
metadata.AddInt32("room_disallowed_flags", 0 | ROOM_AUTOJOIN
| ROOM_AUTOCREATE);
_SendMessage(&metadata); _SendMessage(&metadata);
} }
break; break;
@ -1766,8 +1768,8 @@ JabberHandler::handleMUCInfo(gloox::MUCRoom *room, int features,
metadata.AddInt32("im_what", IM_ROOM_METADATA); metadata.AddInt32("im_what", IM_ROOM_METADATA);
metadata.AddString("chat_id", chat_id); metadata.AddString("chat_id", chat_id);
metadata.AddString("chat_name", name.c_str()); metadata.AddString("chat_name", name.c_str());
metadata.AddInt32("room_default_flags", metadata.AddInt32("room_default_flags", 0 | ROOM_AUTOJOIN
0 | ROOM_AUTOJOIN | ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS); | ROOM_LOG_LOCALLY | ROOM_POPULATE_LOGS | ROOM_NOTIFY_DM);
metadata.AddInt32("room_disallowed_flags", 0 | ROOM_AUTOCREATE); metadata.AddInt32("room_disallowed_flags", 0 | ROOM_AUTOCREATE);
_SendMessage(&metadata); _SendMessage(&metadata);
} }