mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Polls: Support sending polls in 1:1 conversations
This commit is contained in:
@@ -255,9 +255,12 @@ export type PollVoteBuildOptions = Required<
|
||||
>;
|
||||
|
||||
export type PollTerminateBuildOptions = Required<
|
||||
Pick<MessageOptionsType, 'groupV2' | 'timestamp' | 'pollTerminate'>
|
||||
Pick<MessageOptionsType, 'timestamp' | 'pollTerminate'>
|
||||
> &
|
||||
Pick<MessageOptionsType, 'profileKey' | 'expireTimer' | 'expireTimerVersion'>;
|
||||
Pick<
|
||||
MessageOptionsType,
|
||||
'groupV2' | 'profileKey' | 'expireTimer' | 'expireTimerVersion'
|
||||
>;
|
||||
|
||||
class Message {
|
||||
attachments: ReadonlyArray<Proto.IAttachmentPointer>;
|
||||
@@ -943,10 +946,12 @@ export class MessageSender {
|
||||
const dataMessage = new Proto.DataMessage();
|
||||
dataMessage.timestamp = Long.fromNumber(timestamp);
|
||||
|
||||
const groupContext = new Proto.GroupContextV2();
|
||||
groupContext.masterKey = groupV2.masterKey;
|
||||
groupContext.revision = groupV2.revision;
|
||||
dataMessage.groupV2 = groupContext;
|
||||
if (groupV2) {
|
||||
const groupContext = new Proto.GroupContextV2();
|
||||
groupContext.masterKey = groupV2.masterKey;
|
||||
groupContext.revision = groupV2.revision;
|
||||
dataMessage.groupV2 = groupContext;
|
||||
}
|
||||
|
||||
if (typeof expireTimer !== 'undefined') {
|
||||
dataMessage.expireTimer = expireTimer;
|
||||
|
||||
Reference in New Issue
Block a user