remove the channelId from groupInvitation

pull/1608/head
Audric Ackermann 4 years ago
parent bd2777ace3
commit e10a3cd4a9
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -187,7 +187,6 @@ message DataMessage {
message GroupInvitation { message GroupInvitation {
optional string serverAddress = 1; optional string serverAddress = 1;
optional uint32 channelId = 2;
optional string serverName = 3; optional string serverName = 3;
} }

@ -670,7 +670,6 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
identifier: id, identifier: id,
timestamp: sentAt, timestamp: sentAt,
serverName: groupInvitation.serverName, serverName: groupInvitation.serverName,
channelId: 1,
serverAddress: groupInvitation.serverAddress, serverAddress: groupInvitation.serverAddress,
expireTimer: this.get('expireTimer'), expireTimer: this.get('expireTimer'),
}); });

@ -5,7 +5,6 @@ import { MessageParams } from '../Message';
interface GroupInvitationMessageParams extends MessageParams { interface GroupInvitationMessageParams extends MessageParams {
serverAddress: string; serverAddress: string;
channelId: number;
serverName: string; serverName: string;
// if there is an expire timer set for the conversation, we need to set it. // if there is an expire timer set for the conversation, we need to set it.
// otherwise, it will disable the expire timer on the receiving side. // otherwise, it will disable the expire timer on the receiving side.
@ -14,14 +13,12 @@ interface GroupInvitationMessageParams extends MessageParams {
export class GroupInvitationMessage extends DataMessage { export class GroupInvitationMessage extends DataMessage {
private readonly serverAddress: string; private readonly serverAddress: string;
private readonly channelId: number;
private readonly serverName: string; private readonly serverName: string;
private readonly expireTimer?: number; private readonly expireTimer?: number;
constructor(params: GroupInvitationMessageParams) { constructor(params: GroupInvitationMessageParams) {
super({ timestamp: params.timestamp, identifier: params.identifier }); super({ timestamp: params.timestamp, identifier: params.identifier });
this.serverAddress = params.serverAddress; this.serverAddress = params.serverAddress;
this.channelId = params.channelId;
this.serverName = params.serverName; this.serverName = params.serverName;
this.expireTimer = params.expireTimer; this.expireTimer = params.expireTimer;
} }
@ -29,7 +26,6 @@ export class GroupInvitationMessage extends DataMessage {
public dataProto(): SignalService.DataMessage { public dataProto(): SignalService.DataMessage {
const groupInvitation = new SignalService.DataMessage.GroupInvitation({ const groupInvitation = new SignalService.DataMessage.GroupInvitation({
serverAddress: this.serverAddress, serverAddress: this.serverAddress,
channelId: this.channelId,
serverName: this.serverName, serverName: this.serverName,
}); });

@ -9,14 +9,12 @@ describe('GroupInvitationMessage', () => {
let message: GroupInvitationMessage; let message: GroupInvitationMessage;
const timestamp = Date.now(); const timestamp = Date.now();
const serverAddress = 'http://localhost'; const serverAddress = 'http://localhost';
const channelId = 1;
const serverName = 'test'; const serverName = 'test';
beforeEach(() => { beforeEach(() => {
message = new GroupInvitationMessage({ message = new GroupInvitationMessage({
timestamp, timestamp,
serverAddress, serverAddress,
channelId,
serverName, serverName,
}); });
}); });
@ -26,7 +24,6 @@ describe('GroupInvitationMessage', () => {
const decoded = SignalService.Content.decode(plainText); const decoded = SignalService.Content.decode(plainText);
expect(decoded.dataMessage?.groupInvitation).to.have.property('serverAddress', serverAddress); expect(decoded.dataMessage?.groupInvitation).to.have.property('serverAddress', serverAddress);
expect(decoded.dataMessage?.groupInvitation).to.have.property('channelId', channelId);
expect(decoded.dataMessage?.groupInvitation).to.have.property('serverName', serverName); expect(decoded.dataMessage?.groupInvitation).to.have.property('serverName', serverName);
}); });

Loading…
Cancel
Save