Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
254
Issues
254
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
c61bd656
Commit
c61bd656
authored
Nov 20, 2018
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify PEP module inits
parent
9d8b56bc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4 additions
and
59 deletions
+4
-59
atom.py
gajim/common/modules/atom.py
+0
-5
pep.py
gajim/common/modules/pep.py
+4
-4
user_activity.py
gajim/common/modules/user_activity.py
+0
-8
user_avatar.py
gajim/common/modules/user_avatar.py
+0
-8
user_location.py
gajim/common/modules/user_location.py
+0
-10
user_mood.py
gajim/common/modules/user_mood.py
+0
-8
user_nickname.py
gajim/common/modules/user_nickname.py
+0
-8
user_tune.py
gajim/common/modules/user_tune.py
+0
-8
No files found.
gajim/common/modules/atom.py
View file @
c61bd656
...
...
@@ -58,11 +58,6 @@ class Atom(AbstractPEPModule):
store_publish
=
False
_log
=
log
def
__init__
(
self
,
con
):
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
def
_extract_info
(
self
,
item
):
entry
=
item
.
getTag
(
'entry'
,
namespace
=
nbxmpp
.
NS_ATOM
)
if
entry
is
None
:
...
...
gajim/common/modules/pep.py
View file @
c61bd656
...
...
@@ -153,11 +153,11 @@ class AbstractPEPModule:
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
:
ConnectionT
,
account
:
str
)
->
None
:
self
.
_account
=
account
def
__init__
(
self
,
con
:
ConnectionT
)
->
None
:
self
.
_con
=
con
self
.
_account
=
con
.
name
self
.
handlers
=
[]
# type: List[Tuple[Any, ...]]
self
.
_stored_publish
=
None
...
...
gajim/common/modules/user_activity.py
View file @
c61bd656
...
...
@@ -30,9 +30,6 @@ class UserActivityData(AbstractPEPData):
type_
=
PEPEventType
.
ACTIVITY
def
__init__
(
self
,
activity
):
self
.
data
=
activity
def
as_markup_text
(
self
):
pep
=
self
.
data
activity
=
pep
[
'activity'
]
...
...
@@ -62,11 +59,6 @@ class UserActivity(AbstractPEPModule):
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
):
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
def
_extract_info
(
self
,
item
):
activity_dict
=
{}
activity_tag
=
item
.
getTag
(
'activity'
,
namespace
=
self
.
namespace
)
...
...
gajim/common/modules/user_avatar.py
View file @
c61bd656
...
...
@@ -32,9 +32,6 @@ class UserAvatarData(AbstractPEPData):
type_
=
PEPEventType
.
AVATAR
def
__init__
(
self
,
avatar
):
self
.
data
=
avatar
class
UserAvatar
(
AbstractPEPModule
):
...
...
@@ -44,11 +41,6 @@ class UserAvatar(AbstractPEPModule):
store_publish
=
False
_log
=
log
def
__init__
(
self
,
con
):
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
def
get_pubsub_avatar
(
self
,
jid
,
item_id
):
log
.
info
(
'Request:
%
s
%
s'
,
jid
,
item_id
)
self
.
_con
.
get_module
(
'PubSub'
)
.
send_pb_retrieve
(
...
...
gajim/common/modules/user_location.py
View file @
c61bd656
...
...
@@ -30,11 +30,6 @@ class UserLocationData(AbstractPEPData):
type_
=
PEPEventType
.
LOCATION
def
__init__
(
self
,
location
):
# set_location plugin uses self._pep_specific_data
self
.
_pep_specific_data
=
location
self
.
data
=
location
def
as_markup_text
(
self
):
location
=
self
.
data
location_string
=
''
...
...
@@ -58,11 +53,6 @@ class UserLocation(AbstractPEPModule):
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
):
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
def
_extract_info
(
self
,
item
):
location_dict
=
{}
location_tag
=
item
.
getTag
(
'geoloc'
,
namespace
=
nbxmpp
.
NS_LOCATION
)
...
...
gajim/common/modules/user_mood.py
View file @
c61bd656
...
...
@@ -37,9 +37,6 @@ class UserMoodData(AbstractPEPData):
type_
=
PEPEventType
.
MOOD
def
__init__
(
self
,
mood
:
Optional
[
Dict
[
str
,
str
]])
->
None
:
self
.
data
=
mood
def
as_markup_text
(
self
)
->
str
:
if
self
.
data
is
None
:
return
''
...
...
@@ -65,11 +62,6 @@ class UserMood(AbstractPEPModule):
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
:
ConnectionT
)
->
None
:
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
# type: List[Tuple[Any, ...]]
def
_extract_info
(
self
,
item
:
nbxmpp
.
Node
)
->
Optional
[
Dict
[
str
,
str
]]:
mood_dict
=
{}
mood_tag
=
item
.
getTag
(
'mood'
,
namespace
=
nbxmpp
.
NS_MOOD
)
...
...
gajim/common/modules/user_nickname.py
View file @
c61bd656
...
...
@@ -36,9 +36,6 @@ class UserNicknameData(AbstractPEPData):
type_
=
PEPEventType
.
NICKNAME
def
__init__
(
self
,
nickname
:
Optional
[
str
])
->
None
:
self
.
data
=
nickname
def
get_nick
(
self
)
->
str
:
return
self
.
data
or
''
...
...
@@ -51,11 +48,6 @@ class UserNickname(AbstractPEPModule):
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
:
ConnectionT
)
->
None
:
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
# type: List[Tuple[Any, ...]]
def
_extract_info
(
self
,
item
:
nbxmpp
.
Node
)
->
Optional
[
str
]:
nick
=
''
child
=
item
.
getTag
(
'nick'
,
namespace
=
nbxmpp
.
NS_NICK
)
...
...
gajim/common/modules/user_tune.py
View file @
c61bd656
...
...
@@ -39,9 +39,6 @@ class UserTuneData(AbstractPEPData):
type_
=
PEPEventType
.
TUNE
def
__init__
(
self
,
tune
:
Optional
[
Dict
[
str
,
str
]])
->
None
:
self
.
data
=
tune
def
as_markup_text
(
self
)
->
str
:
if
self
.
data
is
None
:
return
''
...
...
@@ -72,11 +69,6 @@ class UserTune(AbstractPEPModule):
store_publish
=
True
_log
=
log
def
__init__
(
self
,
con
:
ConnectionT
)
->
None
:
AbstractPEPModule
.
__init__
(
self
,
con
,
con
.
name
)
self
.
handlers
=
[]
# type: List[Tuple[Any, ...]]
def
_extract_info
(
self
,
item
:
nbxmpp
.
Node
)
->
Optional
[
Dict
[
str
,
str
]]:
tune_dict
=
{}
tune_tag
=
item
.
getTag
(
'tune'
,
namespace
=
self
.
namespace
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment