My-OpenPeriscope icon indicating copy to clipboard operation
My-OpenPeriscope copied to clipboard

Channels (groups) management

Open kewalsk opened this issue 6 years ago • 37 comments

Is somebody working on that? This would be the great improvement of this application. Already mentioned about it in original project #https://github.com/Pmmlabs/OpenPeriscope/issues/122

kewalsk avatar Aug 04 '19 09:08 kewalsk

I want to add it but there is nothing about groups in http://static.pmmlabs.ru/OpenPeriscope/ so i don't know how to even access them by API.

gitnew2018 avatar Aug 04 '19 09:08 gitnew2018

Yes it is not documented but no problem. I can share my knowledge.

kewalsk avatar Aug 04 '19 10:08 kewalsk

Heh, can you share how to obtain "the knowledge", without asking people like you ^^.

gitnew2018 avatar Aug 04 '19 10:08 gitnew2018

Yes I know 2 ways to do that. First is to use wireshark to catch the network traffic beetween the client app and server, but I don't know how to handle https. Second is to decompile android client and get the api implementation from sources. It require some basic Java knowledge but the code is easy to understand. This is the wey I'm doing this.

kewalsk avatar Aug 04 '19 10:08 kewalsk

Thanks, I'm not going to decompile android client anytime soon 😁. Just tell me what are the API calls for groups.

gitnew2018 avatar Aug 04 '19 11:08 gitnew2018

I will create the description on github wiki or somewhere else soon.

kewalsk avatar Aug 04 '19 11:08 kewalsk

Yes I know 2 ways to do that. First is to use wireshark to catch the network traffic beetween the client app and server, but I don't know how to handle https. Second is to decompile android client and get the api implementation from sources. It require some basic Java knowledge but the code is easy to understand. This is the wey I'm doing this.

Periscope was not happy with proxy settings + fiddler. a wiki on how to use wireshark would be great!

Max104t avatar Aug 06 '19 23:08 Max104t

Yes, finally.

The documentation is more or less ready. Please take a look on it on my wiki.

kewalsk avatar Aug 11 '19 16:08 kewalsk

Thank you, Bugs have higher priority than new features and unfortunately I'm procrastinating right now 😞. So it might take a while, unless someone wants to help and do it.

gitnew2018 avatar Aug 11 '19 20:08 gitnew2018

I will help for sure.

kewalsk avatar Aug 12 '19 08:08 kewalsk

I like to review this with you before I submit the pull request.. How do you like Accordion style in the Edit section?

image

Max104t avatar Aug 15 '19 07:08 Max104t

I think it's good idea. There is a lot of settings already. Maybe it would be useful also to separate periscope settings, which needs to call api on save, from just saving the local parameters? It's not clear if saving is required on changing some My-OpenPeriscope settings.

kewalsk avatar Aug 15 '19 10:08 kewalsk

I think groups need their separate section. I agree with @kewalsk on the other points.

gitnew2018 avatar Aug 15 '19 11:08 gitnew2018

testing and adding join/leave actions :-D

I need the refactor for splitting the code to get it done..

https://github.com/Max104t/My-OpenPeriscope/tree/support-groups

image

Max104t avatar Aug 16 '19 08:08 Max104t

Ok, I'm going to review and do some basic tests of your PR.

gitnew2018 avatar Aug 16 '19 10:08 gitnew2018

Turns out I'm in 1800+ groups 🤩

gitnew2018 avatar Aug 16 '19 21:08 gitnew2018

Yes, we will need a function like delete_me_from_all_shitty_groups_and_never_let_add_me_again

kewalsk avatar Aug 16 '19 22:08 kewalsk

I've added :

  • group list
  • group images
  • group broadcasts ()clicking on group name
  • owner / invitee link

TODO:

  • members count => click will show members
  • I need help REST API to accept / reject, and leave groups?

latest on https://github.com/Max104t/My-OpenPeriscope/tree/support-groups

image

Max104t avatar Aug 17 '19 00:08 Max104t

Yes, we will need a function like delete_me_from_all_shitty_groups_and_never_let_add_me_again

I like to have this as part of ML plugin.. I have a database of more than a million users tagged and refreshed daily.. it even groups recreated profiles matching description + user names to existing one.. with 2 degrees of separation..

I like to use this data to rank groups and detect members interests..

Max104t avatar Aug 17 '19 01:08 Max104t

That would be great to connect some external database like MySQL to store locally the users, groups, broadcasts, dowloaded videos with additional attributes.

I didn't yet experimented with accept/reject invitation, I suppose the patchChannelMember should be used.

The group leave is quite easy: call the deleteChannelMember with your user id.

kewalsk avatar Aug 17 '19 09:08 kewalsk

Branch merged to master. I'm going to work some more on it. I want to add some kind of preloader circle. Show all groups and invites because right now it shows only ~1860 for me. Maybe some kind of pagination. View group members and history. I'm thinking about iframe or popup for that.

gitnew2018 avatar Aug 22 '19 12:08 gitnew2018

I'm working on the group members and history.

This will take some time because of my javascript experience or rather lack of it, but we have to agree about who is developing which part to avoid conflicts.

When the group list is big (my record is over 5k groups) the critical point is the ease and the response time to show and manage list of groups and then the list of members. I'm not going to mix the invites, groups and membership so there will be 3 main menu items and the functionality will be based (similar) to the list of broadcasts or list of users. The chunks are the open issue - I was thinking about just the button "get more" to retrieve the next part if there is any and append it to the list. The same issue is also related to the members and history and for a big groups (a lot of members) there is even no real possibility to get all parts of history - it is simply too long and the time to get it probably would take several hours (I didn't actually tried to get all the history if the number of chunks were over 2k). The more professional solution would be to cache locally in some kind of database all retrieved information, compare if something changed, retrieve only changes and show the list of data from the database using CRUD with paging, searching and so on.

kewalsk avatar Aug 22 '19 16:08 kewalsk

Ok, you can do group members and history. It's fine by me 😁.

Separate menu sections make sense for huge amounts of groups and members. The "get more" approach seems much simpler to implement than pagination, so we can go with that, at least for now.

I was going to ask why would anyone need to see such long history, but then I realized that, why would you even want group support here, if it wasn't more powerful than official app 😏

gitnew2018 avatar Aug 22 '19 20:08 gitnew2018

My goal is to have it more useful than official app, especially when it comes to browsing and searching the group members or history - currently not possible in official app. Also interesting would be sorting groups by any field: name, creation date, activity, owner, adder. Making statistics from history by type of action.

It looks like a periscope team doesn't pay too much attention to this part of application functionality. The all necessary data is there but for example the history list in official app is something like a joke. Maybe in future they will do something with it, but so far the things are rather going worse.

kewalsk avatar Aug 22 '19 21:08 kewalsk

Are you still there @kewalsk ? I love the way you can browse groups in OP.. probably one of the best additions so far!!! Are you working on coding the part where you can see who's in the group? I would love to see that feature 🙏

Halinks avatar Sep 19 '19 18:09 Halinks

Yes, still working on that as much as I have a time.

The group table is almost ready, except the sorting. Maybe I will add also paging in future because when there is a lot of groups then the building the html table takes more time than calling the api.

The list of group members is ~50% done but not commited yet.

If you want to test it please take my branch groups. It is not ready to be merged into master yet.

kewalsk avatar Sep 19 '19 19:09 kewalsk

Looks good! I don't see any bugs so far.

Halinks avatar Sep 20 '19 20:09 Halinks

There needs to be something done with the very poor performance. It's blocking whole app for couple of seconds. Quick ideas:

  • abandon the table
  • make it asynchronous example

gitnew2018 avatar Nov 18 '19 21:11 gitnew2018

Please describe the problem in more details. Which part has the performance problem? All the API calls are asynchronous or you found it to be synchronous somewhere? Is there any other operation you want to to make asynchronous?

The biggest issue that could make poor performance is appending the long list of groups, members or history actions. Abandoning the tables and making the simple list instead will not give any difference. The loop on the > 2000 groups or other objects to create a list takes long time. The most reasonable solution I can see is to make paging to display only small part of the data. I will go for it some day but now I'm concentrated on the functionality not on the performance.

There could be some other solution that could work but I don't know how to make it - appending only fist small part of the list and then, on response to some event as the user scrolls down, append more. If you have seen something like that implemented just let me know.

kewalsk avatar Nov 19 '19 08:11 kewalsk

When you compare "appending the long list of groups" in existing groups implementation it takes like 2s and in yours 6s, my initial impression is that html tables are much slower.

Images in this app have lazy load implemented(lazysrc) you could check this out.

gitnew2018 avatar Nov 19 '19 15:11 gitnew2018