Implement Quoting #96

Merged
dan merged 7 commits from quote into trunk 2021-07-07 18:46:28 +00:00
Owner

This PR also contains a complete refactor of Messagfes in the UI to reduce duplication when dealing with message, fix a few bugs relating to update message metadata and to make it more compliant with Flutters Future API.

This PR also contains a complete refactor of Messagfes in the UI to reduce duplication when dealing with message, fix a few bugs relating to update message metadata and to make it more compliant with Flutters Future API.
dan was assigned by sarah 2021-07-06 19:51:44 +00:00
erinn was assigned by sarah 2021-07-06 19:51:44 +00:00
dan reviewed 2021-07-06 20:37:32 +00:00
dan left a comment
Owner

also I asked general questions about moving the location of the hashed look up from cwtch to any level higher in chat

also I asked general questions about moving the location of the hashed look up from cwtch to any level higher in chat
@ -0,0 +20,4 @@
return rawMessageEnvelopeFuture.then((dynamic rawMessageEnvelope) {
dynamic messageWrapper = jsonDecode(rawMessageEnvelope);
if (messageWrapper['Message'] == null || messageWrapper['Message'] == '' || messageWrapper['Message'] == '{}') {
return Future.delayed(Duration(seconds: 2), () {
Owner

why a 2 second delate to get a messageHandler?

why a 2 second delate to get a messageHandler?
Author
Owner

Because there is a chance that the index hasn't been added to the timeline yet (because we don't wait until we confirm the message has been added to the timeline before we increment the number of messages in the timeline (e.g. when sending a message))

Because there is a chance that the index hasn't been added to the timeline yet (because we don't wait until we confirm the message has been added to the timeline before we increment the number of messages in the timeline (e.g. when sending a message))
Owner

is there ever a case that it wont get added? cus this is recursion with no end state for an error

is there ever a case that it wont get added? cus this is recursion with no end state for an error
Author
Owner

Added comments on this method to explain why this should mostyly never happen.

Added comments on this method to explain why this should mostyly never happen.
@ -0,0 +46,4 @@
var metadata = MessageMetadata(profileOnion, contactHandle, index, timestamp, senderHandle, senderImage, signature, flags, ackd, error);
switch (overlay) {
case 1:
Owner

we prolly want to capture these as defined consts somewhere?

we prolly want to capture these as defined consts somewhere?
sarah marked this conversation as resolved
@ -0,0 +27,4 @@
String inviteTarget;
String inviteNick;
if (this.content.length == 56) {
Owner

define const or make isGroup()

define const or make isGroup()
sarah marked this conversation as resolved
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/74
sarah force-pushed quote from 5e8c700ce7 to 5d1fa05079 2021-07-07 17:05:49 +00:00 Compare
sarah changed title from WIP: Implement Quoting to Implement Quoting 2021-07-07 17:06:03 +00:00
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/83
sarah force-pushed quote from 5d1fa05079 to e4046fb574 2021-07-07 18:11:17 +00:00 Compare
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/84
sarah added 1 commit 2021-07-07 18:25:21 +00:00
continuous-integration/drone/pr Build is passing Details
1c460b431e
Remove print + add check for body in quote
dan approved these changes 2021-07-07 18:28:52 +00:00
@ -0,0 +55,4 @@
var error = messageWrapper['Error'] != null;
String? signature;
// If this is a group, store the signature
if (contactHandle.length == 32) {
Owner

const

const
sarah added 1 commit 2021-07-07 18:31:26 +00:00
continuous-integration/drone/pr Build is passing Details
0c9da27363
const group handle length
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/86
dan merged commit 84a0ca5d19 into trunk 2021-07-07 18:46:28 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/85
Sign in to join this conversation.
No reviewers
dan
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#96
No description provided.