Skip to content
Snippets Groups Projects
Commit 19f666f0 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

nodejs: fix binding

Change-Id: I6d7fe3f7593764bbb99570ba02b987943ba35a18
parent 2088e384
No related branches found
No related tags found
No related merge requests found
......@@ -582,6 +582,24 @@ messageReceived(const std::string& accountId,
uv_async_send(&signalAsync);
}
void
conversationProfileUpdated(const std::string& accountId,
const std::string& conversationId ,
const std::map<std::string, std::string>& profile)
{
std::lock_guard<std::mutex> lock(pendingSignalsLock);
pendingSignals.emplace([accountId, conversationId, profile]() {
Local<Function> func = Local<Function>::New(Isolate::GetCurrent(), conversationProfileUpdatedCb);
if (!func.IsEmpty()) {
SWIGV8_VALUE callback_args[] = {V8_STRING_NEW_LOCAL(accountId),
V8_STRING_NEW_LOCAL(conversationId),
stringMapToJsMap(profile)};
func->Call(SWIGV8_CURRENT_CONTEXT(), SWIGV8_NULL(), 3, callback_args);
}
});
uv_async_send(&signalAsync);
}
void
conversationRequestReceived(const std::string& accountId,
const std::string& conversationId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment