File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,15 @@ UInt16 SaturatingDecrement(UInt16 base) {
81
81
return base == 0 ? base : base - 1 ;
82
82
}
83
83
84
- static TootContent * TootContentConstructor (UInt16 length ) {
84
+ static TootContent * TootContentConstructor (UInt16 length , UInt16 * is_reply_to ) {
85
85
int size = sizeof (TootContent ) + length + sizeof (char );
86
86
TootContent * ret = (TootContent * ) MemPtrNew (size );
87
87
MemSet (ret , size , 0 );
88
+ if (is_reply_to != NULL ) {
89
+ // adding +1 here to emulate an option type.
90
+ // this is subtracted again in the conduit
91
+ ret -> is_reply_to = * is_reply_to + 1 ;
92
+ }
88
93
ret -> content_len = length ;
89
94
return ret ;
90
95
}
@@ -672,7 +677,8 @@ static Boolean ComposeTootFormHandleEvent(EventType* event) {
672
677
MemHandle content_handle = FldGetTextHandle (content );
673
678
FldSetTextHandle (content , NULL );
674
679
char * content_str = (char * ) MemHandleLock (content_handle );
675
- TootContent * to_write = TootContentConstructor (StrLen (content_str ));
680
+ UInt16 * is_reply_to = sharedVarsP -> toot_is_reply_to_current ? & (sharedVarsP -> current_toot_author_record ) : NULL ;
681
+ TootContent * to_write = TootContentConstructor (StrLen (content_str ), is_reply_to );
676
682
#ifdef HEFFALUMP_TESTING
677
683
ErrNonFatalDisplayIf (StrLen (content_str ) == 0 , "Composed toot has zero len" );
678
684
#endif
You can’t perform that action at this time.
0 commit comments