handle empty group id after decoding and set it to null

pull/1223/head
Audric Ackermann 5 years ago
parent 178060e4d2
commit bd67040086
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -435,6 +435,14 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel {
} = data;
const type = 'incoming';
if (
message &&
message.group &&
message.group.id &&
message.group.id.length === 0
) {
message.group.id = null;
}
const groupId = message?.group?.id;
const messageData: any = {
@ -614,10 +622,11 @@ export async function handleMessageEvent(event: any): Promise<void> {
const primarySource = await MultiDeviceProtocol.getPrimaryDevice(source);
if (isGroupMessage) {
/* handle one part of the group logic here:
handle requesting info of a new group,
dropping an admin only update from a non admin, ...
*/
handle requesting info of a new group,
dropping an admin only update from a non admin, ...
*/
conversationId = message.group.id;
const shouldReturn = await preprocessGroupMessage(
source,
message.group,

Loading…
Cancel
Save