Skip to content

Commit a7f2fed

Browse files
authored
Merge pull request #19 from geotribu/feature/use-system-username-as-default-nickname
feature(qchat): use system username as default nickname
2 parents 41127af + 50d39cf commit a7f2fed

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

qchat/toolbelt/preferences.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
#! python3 # noqa: E265
22

3-
"""
4-
Plugin settings.
5-
"""
6-
7-
import random
3+
"""Plugin settings."""
84

95
# standard
106
from dataclasses import asdict, dataclass, fields
7+
from getpass import getuser
118

129
# PyQGIS
1310
from qgis.core import QgsSettings
@@ -63,7 +60,7 @@ class PlgSettingsStructure:
6360
f"utm_source=QGIS&utm_medium={__title__}&utm_campaign=plugin_{__version__}"
6461
)
6562

66-
nickname: str = f"jd_{random.randint(1000, 9999)}"
63+
nickname: str = getuser()
6764
avatar: str = "mGeoPackage.svg"
6865

6966
instance_uri: str = "https://qchat.geotribu.net"

0 commit comments

Comments
 (0)