|
@@ -413,7 +413,7 @@ std::string ProtoParser::searchConversation(std::string keyword, std::string typ
|
|
|
con.set_type(item.conversation().type());
|
|
|
con.set_target(item.conversation().target());
|
|
|
con.set_line(item.conversation().line());
|
|
|
- toJson(writer, con, item);
|
|
|
+ toJson(writer, con, item, _uid.c_str());
|
|
|
return true;
|
|
|
});
|
|
|
writer.EndArray();
|
|
@@ -686,7 +686,7 @@ unsigned char ProtoParser::parsePayload(std::string &payload, bool pub)
|
|
|
|
|
|
p->update(r, _msgCurrent);
|
|
|
std::list<Message> messages;
|
|
|
- toJson(r, _payload, messages);
|
|
|
+ toJson(r, _payload, messages, _uid.c_str());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -700,7 +700,7 @@ unsigned char ProtoParser::parsePayload(std::string &payload, bool pub)
|
|
|
{
|
|
|
p->update(r, _msgCurrent);
|
|
|
std::list<Message> messages;
|
|
|
- toJson(r, _payload, messages);
|
|
|
+ toJson(r, _payload, messages, _uid.c_str());
|
|
|
}
|
|
|
}
|
|
|
else if (_topic.compare("GMUT") == 0) // uploadMedia
|
|
@@ -736,7 +736,7 @@ unsigned char ProtoParser::parsePayload(std::string &payload, bool pub)
|
|
|
{
|
|
|
p->update(r, _uid, _msgCurrent);
|
|
|
}
|
|
|
- toJson(r, _payload);
|
|
|
+ toJson(r, _payload, _uid.c_str());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1698,7 +1698,7 @@ std::string ProtoParser::getConversationInfos(std::string types, std::string lin
|
|
|
con.set_type(item.conversation().type());
|
|
|
con.set_target(item.conversation().target());
|
|
|
con.set_line(item.conversation().line());
|
|
|
- toJson(writer, con, item);
|
|
|
+ toJson(writer, con, item, _uid.c_str());
|
|
|
return true;
|
|
|
});
|
|
|
writer.EndArray();
|
|
@@ -1886,7 +1886,7 @@ std::string ProtoParser::getConversationInfo(std::string requestJson)
|
|
|
lines = "[" + std::to_string(par.line()) + "]";
|
|
|
p->getConversation(nullptr, types.c_str(), lines.c_str(), [&](const auto &item) {
|
|
|
writer.Key("lastMessage");
|
|
|
- toJson(writer, item);
|
|
|
+ toJson(writer, item, _uid.c_str());
|
|
|
timestamp = item.server_timestamp();
|
|
|
return true;
|
|
|
});
|
|
@@ -1936,7 +1936,7 @@ std::string ProtoParser::getMessage(std::string str)
|
|
|
rapidjson::StringBuffer buffer;
|
|
|
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
|
|
|
p->getMessage(id, [&](const auto &item) {
|
|
|
- toJson(writer, item);
|
|
|
+ toJson(writer, item, _uid.c_str());
|
|
|
return false;
|
|
|
});
|
|
|
auto ret = buffer.GetString();
|
|
@@ -1990,7 +1990,7 @@ std::string ProtoParser::getMessages(std::string requestJson)
|
|
|
count = 100;
|
|
|
int cnt = 0;
|
|
|
p->getMessage(before, idx, count, par.type(), par.line(), par.target().c_str(), [&](const auto &item) {
|
|
|
- toJson(writer, item);
|
|
|
+ toJson(writer, item, _uid.c_str());
|
|
|
return true;
|
|
|
});
|
|
|
}
|
|
@@ -2041,7 +2041,7 @@ std::string ProtoParser::getAllMessages() const
|
|
|
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
|
|
|
for (const auto &item : items)
|
|
|
{
|
|
|
- toJson(writer, item);
|
|
|
+ toJson(writer, item, _uid.c_str());
|
|
|
}
|
|
|
auto ret = buffer.GetString();
|
|
|
return ret;
|