Send Reactions

This commit is contained in:
Ken Powers
2020-01-23 18:57:37 -05:00
committed by Scott Nonnenberg
parent 3b050116fc
commit 153503efc5
16 changed files with 683 additions and 41 deletions

View File

@@ -32,6 +32,7 @@ function Message(options) {
this.quote = options.quote;
this.recipients = options.recipients;
this.sticker = options.sticker;
this.reaction = options.reaction;
this.timestamp = options.timestamp;
if (!(this.recipients instanceof Array)) {
@@ -123,6 +124,9 @@ Message.prototype = {
proto.sticker.data = this.sticker.attachmentPointer;
}
}
if (this.reaction) {
proto.reaction = this.reaction;
}
if (Array.isArray(this.preview)) {
proto.preview = this.preview.map(preview => {
const item = new textsecure.protobuf.DataMessage.Preview();
@@ -927,6 +931,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
timestamp,
expireTimer,
profileKey,
@@ -940,6 +945,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
expireTimer,
profileKey,
flags,
@@ -967,6 +973,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
timestamp,
expireTimer,
profileKey,
@@ -981,6 +988,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
expireTimer,
profileKey,
},
@@ -1065,6 +1073,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
timestamp,
expireTimer,
profileKey,
@@ -1080,6 +1089,7 @@ MessageSender.prototype = {
quote,
preview,
sticker,
reaction,
expireTimer,
profileKey,
group: {