How to make multi-subscriber modelling like Twitch,OnlyFans - google-play

I want to make dynamic multi-subscribing modeling like Twitch, Onlyfans. For example, my customer can subscribe user1 feed also user2 feed but user1 and user2 is not static, it's dynamic.
How can I achieve this in RevenueCat? Is subscribing API allow that? How Twitch achieved this?

Related

How do I initiate a dynamic user prompt depending on an API response in Bot Composer?

I have an API response in which a field gives me an array of objects. I want to prompt the user to select which one of these objects in the array they want to see the details of. For example, if the API response has a field like:
"field":[
{"number":"101","name":"abc","value":"final output 1"},
{"number":"102","name":"xyz","value":"final output 2"}
]
I want the prompt/card to ask which number and name the user wants to choose, accordingly I want to show the corresponding value to the user. The number of objects in the array can vary. I would prefer if this prompt is in the form of an adaptive card like the one in the attached image, but any solution would do using bot composer's capabilities.
One viable solution would be to build a card in code. You can parse the response from the API and use it to create a card which can then be sent by the bot. Since this is Composer, you can look into creating a custom action to hold this logic.
As the user AP01 has said, one good solution to this problem is to do it inside the code. You can create a custom component that will execute C#(or nodejs if you use that) code in which you can then easily deserialize/parse/process that json array and create a custom card that will then be display to the user. That is how I did it.

Generic, role based emails (e.g. root# admin#, etc). Determining?

I want to filter out generic, marketing based emails ("role based emails", e.g. orders#example.com, newsletter#example.com).
The Rapportive Chrome extension seems to label role based emails pretty accurately. Not only does it get the ultra generic emails, but it classifies correctly non-common role based emails like slashdot#slashdot.org, nytdirect#nytimes.com, etc.
I'm looking for either A) a comprehensive list of role based email addresses or 2) an algorithm to determine whether an email is a role based email (is there a header I should be looking at?).
Found my answer: most reputable mail list servers are including the List-Unsubscribe header in the email message.

Parse - Using User ACLs to share user information

I've got a question about the best way to allow user's information to be visible between users in certain situations.
For example, my app will have a "FriendRequest" class to model friend requests between users. The "FriendRequest" class has two User pointers, "toUser" and "fromUser".
I also set a default ACL for all user objects to restrict access to that user only for read/write.
My question is, when a user sends a friend request, I add the pointers for each user, and set the ACL of the "FriendRequest" object to allow both users to read and write to that object. However, when the user retrieves the friend request data, the "fromUser" data is not returned from the query because the ACL of the "fromUser" allows access to only that user - not to the other user who receives the friend request.
What is the best way to allow this data to be visible? Whenever a "FriendRequest" is created, should I add read permissions to the "fromUser" ACL for the "toUser" to be able to read it's information?
Any help is appreciated!
Thanks
Ok lets setup some sample data to make the example problem clearer.
In the Users table:
{objectId:"BBBB", name:"Bob", age:18, email:"bob#email.com", ACL: only Bob Read/Write}
{objectId:"JJJJ", name:"Jane", age:27, email:"jane#email.com", ACL: only Jane Read/Write}
So Bob sends a friend request to Jane. You create a new object in the FriendRequest class.
{objectId:"XXXX", fromUser: <ptr to BBBB>, toUser: <ptr to JJJJ>, ACL: Bob and Jane Read/Write}
In your current setup, since you have setup the ACL so that noone else can read them.
Option 1
As you have suggested, when Bob makes the request to Jane, since it is initiated from a device where Bob is logged in, he can add Jane to the ACL. You will then need to remove Jane from the ACL either when she accepts or rejects the friend request, or perhaps after a certain amount of time.
This is simple when Jane needs to request data from Bob, as she can pull it from his user class, however it requires more management later on (ensuring the ACLs are reset properly later on, using a scheduled task to ensure that all friend requests not resolved after 2 weeks are "rest", finally, if there is some reason you are securing all user classes so that they are read only, temporarily making all of Bob's attributes readable to Jane might be a bad thing.
Lazy Option
You could just make all users read-to-all. More insecure obviously and something I imagine you want to avoid since you are using ACLs and posted this in the first place.
Data Duplication Option
This requires temporarily data duplication, but then you are only the specific information you require, nothing more. Say you want name and email but not age from the user.
{objectId:"XXXX",
fromUser: <ptr to BBBB>,
fromUserName: 'Bob'
fromuserEmail: 'bob#email.com'
toUser: <ptr to JJJJ>,
ACL: Bob and Jane Read/Write}
So when Bob creates the request, he puts his own info into the request object. Jane can read this info. Once the request is complete, you could make it so that Jane could read Bob's data, or you may have some other table FriendRelations which described these relationships (again, duplicating relevant data if this made things more secure for you).

Multiple ajax calls in the same moment to c# static webMethod

I have a problem with multiple ajax calls in the same moment to c# static webMethod.
I never thought about it but now i can see with my eyes that it's maybe a problem..
If two users request at the same time the same webmethod the response of user2 is the same of the user1.. For example:
user1 requests the products with a type1 filter
user2 requsts the products with a type2 filter
I can see that user1 receives the right results but user2 receive the same results of user1 that is not the right one!
User1 and User2 call the same webmethod from 2 different browsers.
Is it possible? How can i fix it? Must i create a "requests manager" in each webmethod?
Thanks a lot for the answers!
Ok, i made a lot of specific test and the results say that is not an ajax problem... so i think my methods are the problem! (maybe because it refers to static variabiles external to my webMethods like ObjectContext)

Controlling content access by domain

For a user generated content website, I want to give ability to my users to restrict on who can see the content.
Domain based restriction seems like a good choice( users can embed content content on their own site).
Any samples/suggestions/known gotchas on how we should implement domain restriction on content?
Our solution is developed on asp.net mvc
The authorization scheme you would use is independent of whether you use DDD or not.
You would probably use a Role-based authorization scheme. Every item of content then comes with an Access Control List (ACL), which is basically a list of roles and their rights -- for instance, all users who are in the FoodAuthors group can modify a particular piece of content, and all users in the FoodReaders group can only read it. Users who are in neither group/role have no access to the content.
Furthermore, you can divide up your content into categories (or "channels", whatever term you prefer), and organize these categories/channels in a tree structure. Then you can put ACLs on the categories/channels rather than on the content itself. So, an article on whole foods would be put in the /Health/Food channel, for instance, and the FoodReaders group would get read access to all content in that channel.

Resources