mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Polls: Longer question length and 1:1 Receive Support
Co-authored-by: jimio <jimio@jimio-m3-max.local> Co-authored-by: Yash <yash@signal.org>
This commit is contained in:
@@ -243,9 +243,12 @@ export type GroupMessageOptionsType = Readonly<
|
||||
>;
|
||||
|
||||
export type PollVoteBuildOptions = Required<
|
||||
Pick<MessageOptionsType, 'groupV2' | 'timestamp' | 'pollVote'>
|
||||
Pick<MessageOptionsType, 'timestamp' | 'pollVote'>
|
||||
> &
|
||||
Pick<MessageOptionsType, 'profileKey' | 'expireTimer' | 'expireTimerVersion'>;
|
||||
Pick<
|
||||
MessageOptionsType,
|
||||
'groupV2' | 'profileKey' | 'expireTimer' | 'expireTimerVersion'
|
||||
>;
|
||||
|
||||
export type PollTerminateBuildOptions = Required<
|
||||
Pick<MessageOptionsType, 'groupV2' | 'timestamp' | 'pollTerminate'>
|
||||
@@ -689,13 +692,13 @@ class Message {
|
||||
}
|
||||
}
|
||||
|
||||
type AddPniSignatureMessageToProtoOptionsType = Readonly<{
|
||||
export type AddPniSignatureMessageToProtoOptionsType = Readonly<{
|
||||
conversation?: ConversationModel;
|
||||
proto: Proto.Content;
|
||||
reason: string;
|
||||
}>;
|
||||
|
||||
function addPniSignatureMessageToProto({
|
||||
export function addPniSignatureMessageToProto({
|
||||
conversation,
|
||||
proto,
|
||||
reason,
|
||||
@@ -838,10 +841,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