From 899221e2d058f5afe30bb2ecdbf168c8ad3c15a6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Jan 2023 19:48:42 +0300 Subject: Group chats: all old APIs with lookup by module+session removed --- plugins/MirLua/src/Modules/m_chat.cpp | 2 -- plugins/MirLua/src/Modules/m_message.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins/MirLua/src') diff --git a/plugins/MirLua/src/Modules/m_chat.cpp b/plugins/MirLua/src/Modules/m_chat.cpp index 8611b6bc08..a5e7ef57e4 100644 --- a/plugins/MirLua/src/Modules/m_chat.cpp +++ b/plugins/MirLua/src/Modules/m_chat.cpp @@ -10,8 +10,6 @@ LUAMOD_API int luaopen_m_chat(lua_State *L) luaL_newlib(L, chatApi); MT(L, "GCEVENT") - .Field(&GCEVENT::pszModule, "Module", LUA_TSTRINGA) - .Field(&GCEVENT::pszID, "Id", LUA_TSTRINGW) .Field(&GCEVENT::iType, "Type", LUA_TINTEGER) .Field(&GCEVENT::time, "Timestamp", LUA_TINTEGER) .Field(&GCEVENT::time, "IsMe", LUA_TINTEGER) diff --git a/plugins/MirLua/src/Modules/m_message.cpp b/plugins/MirLua/src/Modules/m_message.cpp index a00ec285e1..eee8c43f3e 100644 --- a/plugins/MirLua/src/Modules/m_message.cpp +++ b/plugins/MirLua/src/Modules/m_message.cpp @@ -30,7 +30,7 @@ static int message_Send(lua_State *L) if (Contact::IsGroupChat(hContact, szProto)) { ptrW wszChatRoom(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto)); ptrW wszMessage(mir_utf8decodeW(message)); - res = Chat_SendUserMessage(szProto, wszChatRoom, wszMessage); + res = Chat_SendUserMessage(Chat_Find(wszChatRoom, szProto), wszMessage); lua_pushinteger(L, res); } else if ((res = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED) { -- cgit v1.2.3