Invite users to the socializer's group during the first start. This will be done only if the user is not already a member
This commit is contained in:
parent
ff4496be24
commit
1545bf39ee
@ -11,6 +11,7 @@
|
|||||||
* When opening a timeline, if the current user is not allowed to do it, an error message should be displayed and the buffer will not be created. Before the buffer was partially created in the main window. ([#22.](https://code.manuelcortez.net/manuelcortez/socializer/issues/22))
|
* When opening a timeline, if the current user is not allowed to do it, an error message should be displayed and the buffer will not be created. Before the buffer was partially created in the main window. ([#22.](https://code.manuelcortez.net/manuelcortez/socializer/issues/22))
|
||||||
* Added basic support to handle group chats. At the current moment it is possible to receive and reply to chat messages only. Chat groups will be placed inside the conversations section. ([#23.](https://code.manuelcortez.net/manuelcortez/socializer/issues/23))
|
* Added basic support to handle group chats. At the current moment it is possible to receive and reply to chat messages only. Chat groups will be placed inside the conversations section. ([#23.](https://code.manuelcortez.net/manuelcortez/socializer/issues/23))
|
||||||
* It is possible to delete a conversation buffer from the buffer menu. Deleting a conversation will only dismiss the buffer, no data is deleted at VK.
|
* It is possible to delete a conversation buffer from the buffer menu. Deleting a conversation will only dismiss the buffer, no data is deleted at VK.
|
||||||
|
* During the first start of Socializer, an invitation will be shown to join the Socializer's group in case the current user is not already a member.
|
||||||
* It is possible to see how many people has read a wall post when showing it in the dialog. ([#28.](https://code.manuelcortez.net/manuelcortez/socializer/issues/28))
|
* It is possible to see how many people has read a wall post when showing it in the dialog. ([#28.](https://code.manuelcortez.net/manuelcortez/socializer/issues/28))
|
||||||
* Added functionality regarding comments in wall posts:
|
* Added functionality regarding comments in wall posts:
|
||||||
* when reading a post, you can press enter in any comment to display a dialog from where it is possible to view attachments, translate, check spelling or reply to the thread. If there are replies made to this comment, these will be visible in a section called replies. Pressing enter in a reply will also open the same dialog.
|
* when reading a post, you can press enter in any comment to display a dialog from where it is possible to view attachments, translate, check spelling or reply to the thread. If there are replies made to this comment, these will be visible in a section called replies. Pressing enter in a reply will also open the same dialog.
|
||||||
|
@ -530,12 +530,25 @@ class Controller(object):
|
|||||||
# time.sleep(0.3)
|
# time.sleep(0.3)
|
||||||
|
|
||||||
def get_communities(self, user_id=None, create_buffers=True):
|
def get_communities(self, user_id=None, create_buffers=True):
|
||||||
|
if self.session.settings["vk"]["invited_to_group"] == False:
|
||||||
|
socializer_group = self.session.vk.client.groups.getById(group_ids="175825000")[0]
|
||||||
|
if socializer_group["is_member"] ==False:
|
||||||
|
d = commonMessages.join_group()
|
||||||
|
self.session.settings["vk"]["invited_to_group"] = True
|
||||||
|
self.session.settings.write()
|
||||||
|
if d == widgetUtils.YES:
|
||||||
|
result = self.session.vk.client.groups.join(group_id=socializer_group["id"])
|
||||||
|
if result == 1:
|
||||||
|
commonMessages.group_joined()
|
||||||
|
else:
|
||||||
|
log.error("Invalid result when joining the Socializer's group: %d" % (result))
|
||||||
log.debug("Create community buffers...")
|
log.debug("Create community buffers...")
|
||||||
groups= self.session.vk.client.groups.get(user_id=user_id, extended=1, fields="city, country, place, description, wiki_page, members_count, counters, start_date, finish_date, can_post, can_see_all_posts, activity, status, contacts, links, fixed_post, verified, site, can_create_topic")
|
groups= self.session.vk.client.groups.get(user_id=user_id, extended=1, fields="city, country, place, description, wiki_page, members_count, counters, start_date, finish_date, can_post, can_see_all_posts, activity, status, contacts, links, fixed_post, verified, site, can_create_topic", count=1000)
|
||||||
self.session.groups=groups["items"]
|
self.session.groups=groups["items"]
|
||||||
# Let's feed the local database cache with new groups coming from here.
|
# Let's feed the local database cache with new groups coming from here.
|
||||||
data= dict(profiles=[], groups=groups["items"])
|
data= dict(profiles=[], groups=groups["items"])
|
||||||
self.session.process_usernames(data)
|
self.session.process_usernames(data)
|
||||||
|
# check if the current user has not been invited to socializer's group or is not a member of it.
|
||||||
if create_buffers:
|
if create_buffers:
|
||||||
for i in groups["items"]:
|
for i in groups["items"]:
|
||||||
# print(list(i.keys()))
|
# print(list(i.keys()))
|
||||||
|
@ -3,6 +3,7 @@ user = string(default="")
|
|||||||
password = string(default="")
|
password = string(default="")
|
||||||
token = string(default="")
|
token = string(default="")
|
||||||
use_alternative_tokens = boolean(default=False)
|
use_alternative_tokens = boolean(default=False)
|
||||||
|
invited_to_group = boolean(default=False)
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
reverse_timelines = boolean(default=False)
|
reverse_timelines = boolean(default=False)
|
||||||
|
@ -39,4 +39,10 @@ def updated_status():
|
|||||||
return wx.MessageDialog(None, _("Your status message has been successfully updated."), _("Success")).ShowModal()
|
return wx.MessageDialog(None, _("Your status message has been successfully updated."), _("Success")).ShowModal()
|
||||||
|
|
||||||
def remove_post():
|
def remove_post():
|
||||||
return wx.MessageDialog(None, _("Do you really want to delete this post?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
return wx.MessageDialog(None, _("Do you really want to delete this post?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||||
|
|
||||||
|
def join_group():
|
||||||
|
return wx.MessageDialog(None, _("If you like socializer, you can join or community from where you can ask for help, give us your feedback and help other users of the application. New releases are posted in the group too. Would you like to join the Socializer community?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||||
|
|
||||||
|
def group_joined():
|
||||||
|
return wx.MessageDialog(None, _("You have joined the Socializer community."), _("Success")).ShowModal()
|
Loading…
Reference in New Issue
Block a user