File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
session/libsession/messaging/messages/visible
thoughtcrime/securesms/pro Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ data class VisibleMessage(
3030 var reaction : Reaction ? = null ,
3131 var hasMention : Boolean = false ,
3232 var blocksMessageRequests : Boolean = false ,
33+ /* *
34+ * The pro features enabled for this message.
35+ *
36+ * Note:
37+ * * When this message is an incoming message, the pro features will only be populated
38+ * if we can prove that the sender has an active pro subscription.
39+ *
40+ * * When this message represents an outgoing message, this property can be populated by
41+ * application code at their wishes but the actual translating to protobuf onto the wired will
42+ * be checked against the current user's pro proof, if no active pro subscription is found,
43+ * the pro features will not be sent in the protobuf messages.
44+ */
3345 var proFeatures : Set <ProFeature > = emptySet()
3446) : Message() {
3547
Original file line number Diff line number Diff line change @@ -381,8 +381,11 @@ class ProStatusManager @Inject constructor(
381381 // if the debug is set, return that
382382 if (prefs.forceIncomingMessagesAsPro()) return MAX_CHARACTER_PRO
383383
384- // otherwise return the true value
385- return if (isPostPro()) MAX_CHARACTER_REGULAR else MAX_CHARACTER_PRO // todo PRO implement real logic once it's in
384+ if (message.proFeatures.contains(ProMessageFeature .HIGHER_CHARACTER_LIMIT )) {
385+ return MAX_CHARACTER_PRO
386+ }
387+
388+ return MAX_CHARACTER_REGULAR
386389 }
387390
388391 // Temporary method and concept that we should remove once Pro is out
You can’t perform that action at this time.
0 commit comments